fix(schedule-type): accept X-API-Key for CRUD #19
Reference in New Issue
Block a user
Delete Branch "feat/schedule-type-apikey-auth"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
/schedule-types/router was the last surface still gated onget_current_user(JWT-only). The companion special-slot router (PR #18) usedget_current_user_or_apikey, so admin had to DB-insert the schedule_type and then call API for the special slot — annoying asymmetry.Swaps all 5 CRUD endpoints (list / create / patch / delete / assign-agent) to
get_current_user_or_apikeyso the same hzhang admin api_key works for both./schedule-types/agent/meusesX-Agent-IDheaders (not user auth), unchanged. JWT callers unaffected — the OR dependency tries api_key first then falls back to JWT.🤖 Generated with Claude Code