增加一键重启所有网关按钮
This commit is contained in:
@@ -250,6 +250,32 @@ export async function mockHermesApi(page: Page, options: MockHermesApiOptions =
|
||||
return
|
||||
}
|
||||
|
||||
if (pathname === '/api/hermes/profiles/gateways/restart-all') {
|
||||
if (request.method() !== 'POST') {
|
||||
await route.fulfill(jsonResponse({ error: 'Method not allowed' }, 405))
|
||||
return
|
||||
}
|
||||
await route.fulfill(jsonResponse({
|
||||
success: true,
|
||||
restarted: ['default', 'research'],
|
||||
failed: [],
|
||||
}))
|
||||
return
|
||||
}
|
||||
|
||||
if (pathname === '/api/hermes/profiles/restart-all') {
|
||||
if (request.method() !== 'POST') {
|
||||
await route.fulfill(jsonResponse({ error: 'Method not allowed' }, 405))
|
||||
return
|
||||
}
|
||||
await route.fulfill(jsonResponse({
|
||||
success: true,
|
||||
restarted: ['default', 'research'],
|
||||
failed: [],
|
||||
}))
|
||||
return
|
||||
}
|
||||
|
||||
if (pathname === '/api/hermes/profiles/active') {
|
||||
if (request.method() !== 'PUT') {
|
||||
await route.fulfill(jsonResponse({ error: 'Method not allowed' }, 405))
|
||||
|
||||
Reference in New Issue
Block a user