/
home
/
techb158
/
cosmic-risk.abdallabala.com
/
src
/
app
/
api
/
projects
/
[projectId]
/
gate
/
history
/
/home/techb158/cosmic-risk.abdallabala.com/src/app/api/projects/[projectId]/gate/history
mkdir
upload
Name
Size
Mode
Actions
route.js
665
0644
edit
dl
rm
Edit:
/home/techb158/cosmic-risk.abdallabala.com/src/app/api/projects/[projectId]/gate/history/route.js
(665B)
const { getActorFromRequest } = require("../../../../../../lib/request-context"); const { requireProjectAccess } = require("../../../../../../lib/tenant-guard"); const { listGateHistory } = require("../../../../../../services/gate-service"); const { jsonResponse, errorResponse } = require("../../../../../../lib/http"); export async function GET(request, { params }) { try { const { projectId } = await params; const actor = await getActorFromRequest(request); await requireProjectAccess(actor, projectId, "gate:read"); return jsonResponse({ gates: await listGateHistory(projectId) }); } catch (error) { return errorResponse(error); } }
Save
cmd:
run