Add auth to AI endpoint.
This commit is contained in:
parent
16ebbce704
commit
bd5f22b6a5
|
@ -1,8 +1,9 @@
|
|||
import Router from "@koa/router"
|
||||
import * as controller from "../controllers/ai"
|
||||
import { auth } from "@budibase/backend-core"
|
||||
|
||||
const router: Router = new Router()
|
||||
|
||||
router.post("/api/ai/js", controller.generateJs)
|
||||
router.post("/api/ai/js", auth.builderOrAdmin, controller.generateJs)
|
||||
|
||||
export default router
|
||||
|
|
Loading…
Reference in New Issue