Open
Conversation
# Conflicts: # cmd/api/api.go # cmd/api/applications.go # cmd/api/reviews.go # cmd/api/scans.go # cmd/api/settings.go # docs/docs.go
balebbae
reviewed
Mar 6, 2026
| } | ||
|
|
||
| if err = app.jsonResponse(w, http.StatusOK, response); err != nil { | ||
| app.internalServerError(w, r, err) |
balebbae
reviewed
Mar 6, 2026
|
|
||
| enabled, err = app.store.Application.SetApplicationsEnabled(r.Context(), enabled) | ||
| if err != nil { | ||
| app.internalServerError(w, r, err) |
balebbae
requested changes
Mar 6, 2026
| } | ||
|
|
||
| if err = app.jsonResponse(w, http.StatusOK, response); err != nil { | ||
| app.internalServerError(w, r, err) |
| } | ||
| } | ||
| }, | ||
| "/superadmin/settings/hackathon-date-range": { |
Collaborator
There was a problem hiding this comment.
Looks like some endpoints were deleted make sure to generate the docs before PR
| Count int `json:"count"` | ||
| } | ||
|
|
||
| type ApplicationsEnabledResponse struct { |
Collaborator
There was a problem hiding this comment.
Get and set response are the same struct just keep them as one ApplicationsEnabledResponse
| // @Success 200 {object} UserResponse | ||
| // @Failure 401 {object} object{error=string} | ||
| // @Router /auth/me [get] | ||
| // @Summary Get current user |
Collaborator
There was a problem hiding this comment.
ugh this is an issue were consistently having I'll standardize it to be tabs in the future. This is good tho
balebbae
reviewed
Mar 9, 2026
| // @Failure 500 {object} object{error=string} | ||
| // @Security CookieAuth | ||
| // @Router /applications/enabled [get] | ||
| func (app *application) getApplicationsEnabled(w http.ResponseWriter, r *http.Request) { |
Collaborator
There was a problem hiding this comment.
Move these handlers to settings.go
balebbae
reviewed
Mar 9, 2026
| @@ -0,0 +1,2 @@ | |||
| INSERT INTO settings (key, value) VALUES ('applications_enabled', 'true'::jsonb) | |||
Collaborator
There was a problem hiding this comment.
Make sure migrations are numbered correctly. There shouldn't be 4 up down migrations for 17. 1 up and 1 down per migration
balebbae
reviewed
Mar 9, 2026
| r.Get("/me", app.getOrCreateApplicationHandler) | ||
| r.Patch("/me", app.updateApplicationHandler) | ||
| r.Post("/me/submit", app.submitApplicationHandler) | ||
| r.Get("/enabled", app.getApplicationsEnabled) |
Collaborator
There was a problem hiding this comment.
Move this to admin routes. gonna change implementation.
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NEW PR alert.
GET request for hackers.
POST request for superadmins