INNER CODE UNIT · TypeScript

body

stablyai/orca · cloud/apps/relay/src/app.ts:1179

    const body = AdminCellEvacuateSchema.safeParse(await context.req.json().catch(() => null))
    if (!body.success) return context.json({ error: 'invalid_request' }, 400)
    try {
      const started = await operations.assignments.startActiveCellEvacuations(
        body.data.sourceCellId,
        body.data.targetCellId,
        body.data.limit
      )
      return context.json({ v: 1, started })
    } catch (error) {
      return context.json({ error: operationError(error) }, 409)
    }
  })
  app.post('/v1/admin/evacuation-capacity', async (context) => {
    const bearer = readBearer(context.req.header('authorization'))
    if (config.role !== 'director') return context.json({ error: 'director_only' }, 404)
    if (!bearer || !(await verifyAdminToken(bearer))) {
      return context.json({ error: 'invalid_token' }, 401)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…