Unify retained operation history in Activity
This commit is contained in:
@@ -11,7 +11,7 @@ export function GET({ request }: { request: Request }) {
|
||||
if (!Number.isSafeInteger(page) || page < 1) error(400, 'Invalid operation history page.');
|
||||
if (!isHostOperationFilter(filter)) error(400, 'Invalid operation history filter.');
|
||||
const scope = hostOperationScope(params);
|
||||
for (const key of ['host', 'server'] as const) {
|
||||
for (const key of ['host', 'server', 'operation'] as const) {
|
||||
if (params.has(key) && params.get(key) !== scope[key]) error(400, 'Invalid operation history scope.');
|
||||
}
|
||||
return json(listHostOperationHistory(page, filter, scope), { headers: { 'Cache-Control': 'no-store' } });
|
||||
|
||||
Reference in New Issue
Block a user