-
Notifications
You must be signed in to change notification settings - Fork 2
Feat/applications enabled #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
4ef4146
e8d48ad
fca0226
1267aa9
40c31ea
3800591
683b062
0475cb1
8db4783
4196a0f
aa127e9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| DELETE FROM settings WHERE key = 'applications_enabled'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| INSERT INTO settings (key, value) VALUES ('applications_enabled', 'true'::jsonb) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Make sure migrations are numbered correctly. There shouldn't be 4 up down migrations for 17. 1 up and 1 down per migration |
||
| ON CONFLICT (key) DO NOTHING; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1482,6 +1482,53 @@ const docTemplate = `{ | |
| } | ||
| } | ||
| }, | ||
| "/applications/enabled": { | ||
| "get": { | ||
| "security": [ | ||
| { | ||
| "CookieAuth": [] | ||
| } | ||
| ], | ||
| "description": "Returns whether the application portal is currently open for submissions", | ||
| "produces": [ | ||
| "application/json" | ||
| ], | ||
| "tags": [ | ||
| "applications" | ||
| ], | ||
| "summary": "Get applications enabled status", | ||
| "responses": { | ||
| "200": { | ||
| "description": "OK", | ||
| "schema": { | ||
| "$ref": "#/definitions/main.ApplicationsEnabledResponse" | ||
| } | ||
| }, | ||
| "401": { | ||
| "description": "Unauthorized", | ||
| "schema": { | ||
| "type": "object", | ||
| "properties": { | ||
| "error": { | ||
| "type": "string" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "500": { | ||
| "description": "Internal Server Error", | ||
| "schema": { | ||
| "type": "object", | ||
| "properties": { | ||
| "error": { | ||
| "type": "string" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "/applications/me": { | ||
| "get": { | ||
| "security": [ | ||
|
|
@@ -2366,6 +2413,84 @@ const docTemplate = `{ | |
| } | ||
| } | ||
| }, | ||
| "/superadmin/settings/applications-enabled": { | ||
| "put": { | ||
| "security": [ | ||
| { | ||
| "CookieAuth": [] | ||
| } | ||
| ], | ||
| "description": "Sets whether the application portal is currently open for submissions. Requires SuperAdmin privileges.", | ||
| "produces": [ | ||
| "application/json" | ||
| ], | ||
| "tags": [ | ||
| "superadmin" | ||
| ], | ||
| "summary": "Set applications enabled status", | ||
| "parameters": [ | ||
| { | ||
| "type": "boolean", | ||
| "description": "Enable or disable applications", | ||
| "name": "enabled", | ||
| "in": "query", | ||
| "required": true | ||
| } | ||
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "OK", | ||
| "schema": { | ||
| "$ref": "#/definitions/main.ApplicationsEnabledResponse" | ||
| } | ||
| }, | ||
| "400": { | ||
| "description": "Bad Request", | ||
| "schema": { | ||
| "type": "object", | ||
| "properties": { | ||
| "error": { | ||
| "type": "string" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "401": { | ||
| "description": "Unauthorized", | ||
| "schema": { | ||
| "type": "object", | ||
| "properties": { | ||
| "error": { | ||
| "type": "string" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "403": { | ||
| "description": "Forbidden", | ||
| "schema": { | ||
| "type": "object", | ||
| "properties": { | ||
| "error": { | ||
| "type": "string" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "500": { | ||
| "description": "Internal Server Error", | ||
| "schema": { | ||
| "type": "object", | ||
| "properties": { | ||
| "error": { | ||
| "type": "string" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "/superadmin/settings/hackathon-date-range": { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like some endpoints were deleted make sure to generate the docs before PR |
||
| "get": { | ||
| "security": [ | ||
|
|
@@ -3326,6 +3451,14 @@ const docTemplate = `{ | |
| } | ||
| } | ||
| }, | ||
| "main.ApplicationsEnabledResponse": { | ||
| "type": "object", | ||
| "properties": { | ||
| "enabled": { | ||
| "type": "boolean" | ||
| } | ||
| } | ||
| }, | ||
| "main.CheckEmailResponse": { | ||
| "type": "object", | ||
| "properties": { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Get and set response are the same struct just keep them as one ApplicationsEnabledResponse