-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: auto enable videos when recv metadata from s3
* fix: auto enable videos when json data is fetched from s3, allow sysadmins * fix: add migration to handle superadmin role, fix navbar + github deploy action
- Loading branch information
Showing
9 changed files
with
144 additions
and
84 deletions.
There are no files selected for viewing
This file contains 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
File renamed without changes.
24 changes: 24 additions & 0 deletions
24
backend/migrations/00019_set_superadmin_role_if_exists.sql
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
-- +goose Up | ||
-- +goose StatementBegin | ||
DO $$ | ||
BEGIN | ||
IF EXISTS (SELECT 1 FROM public.users WHERE id = 1 AND role = 'admin') THEN | ||
UPDATE public.users | ||
SET name = 'system_admin' | ||
WHERE id = 1; | ||
END IF; | ||
END $$; | ||
-- +goose StatementEnd | ||
|
||
|
||
-- +goose Down | ||
-- +goose StatementBegin | ||
DO $$ | ||
BEGIN | ||
IF EXISTS (SELECT 1 FROM public.users WHERE id = 1 AND role = 'system_admin') THEN | ||
UPDATE public.users | ||
SET role = 'admin' | ||
WHERE id = 1; | ||
END IF; | ||
END $$; | ||
-- +goose StatementEnd |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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