Public: anyone can read this; the crew can change it.
GET and POST /api/v1/repos/:owner/:name/app/notes: an app's admin lists the forge button's notes, hides one, bans or unbans its sender #7218
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
For: moderating what visitors send from an app's forge button is one API call, as it already is on the page and in the terminal.
Today
ownerNotes,moderateNoteandunbanSender(src/actions/app_notes.ts:247-316) are reached only fromsrc/web/studio/notes.tsandsrc/tui/screens/notes.ts.Done:
src/http/api/app_notes.ts, registered with one line besidereportRoutes.GET …/app/notesanswers{ notes, banned }, asownerNotesreturns them.POST …/app/notes/:id/hide,…/banand…/unbaneach answer the note, and need anrwtoken and a same-origin or bearer request.forbidden(403). A repository that is not an app, or an unknown note, isnot_found.src/contract/openapi/routes/), andtest/openapi.test.tspasses.test/api-app-notes.test.tssends a note through the forge button's endpoint (src/apps/feedback.ts), then lists, hides, bans and unbans it over the API. It also asserts that a writer who is not an admin, and a read-only token, are refused.Files:
src/http/api/app_notes.ts, OpenAPI route files, one test. Risk: low. The rules stay insrc/actions/app_notes.ts.