Accept admin API tokens for accept-regressions
POST /api/admin/batches/:id/accept-regressions is admin-only; like batch review and task updates, an admin API token can now call it without a browser session.
This commit is contained in:
parent
d7c825abc0
commit
2e3d5a404a
1 changed files with 1 additions and 1 deletions
|
|
@ -1118,7 +1118,7 @@ export function createApp(ctx) {
|
|||
|
||||
// An admin merges a batch that came back only for lowering matching scores (merge.js).
|
||||
router.on('POST', '/api/admin/batches/:id/accept-regressions', async ({ req, params }) => {
|
||||
const user = auth(req, { role: 'admin', session: true });
|
||||
const user = auth(req, { role: 'admin' });
|
||||
const body = await readJson(req, 16 * 1024);
|
||||
const r = merger.acceptRegressions(user, intParam(params.id), body.comment ? String(body.comment) : null);
|
||||
if (runsWorker) setImmediate(() => merger.pump().catch(() => {}));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue