fix: active platform

This commit is contained in:
Acbox
2026-01-12 00:48:25 +08:00
parent 22aa5baaaa
commit 32b0fd9792
2 changed files with 1 additions and 6 deletions
@@ -38,6 +38,7 @@ export const platformModule = new Elysia({
active: platform.active,
})
}
console.log('platforms', platforms)
})
.get('/', async ({ query }) => {
try {
@@ -136,9 +136,6 @@ export const updatePlatformConfig = async (id: string, config: Record<string, un
// active
export const activePlatform = async (platform: Platform) => {
if (platform.active) {
return
}
await fetch(path.join(platform.endpoint, '/start'), {
method: 'POST',
body: JSON.stringify(platform.config),
@@ -149,9 +146,6 @@ export const activePlatform = async (platform: Platform) => {
}
export const inactivePlatform = async (platform: Platform) => {
if (!platform.active) {
return
}
await fetch(path.join(platform.endpoint, '/stop'), {
method: 'POST',
headers: {