feat: user CRUD
This commit is contained in:
21
api/queries/UserQueries.go
Normal file
21
api/queries/UserQueries.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package queries
|
||||
|
||||
const USER_CREATE_QUERY string = `
|
||||
INSERT INTO ordr_user(sub_id, user_name) VALUES ($1, $2);
|
||||
`
|
||||
|
||||
const USER_UPDATE_QUERY string = `
|
||||
UPDATE ordr_user SET user_name = $1 WHERE sub_id = $2;
|
||||
`
|
||||
|
||||
const USER_SET_IS_ADMIN_QUERY string = `
|
||||
UPDATE ordr_user SET is_admin = TRUE WHERE id = $1;
|
||||
`
|
||||
|
||||
const USER_REVOKE_ADMIN_QUERY string = `
|
||||
UPDATE ordr_user SET is_admin = FALSE WHERE id = $1;
|
||||
`
|
||||
|
||||
const USER_SET_INACTIVE_QUERY string = `
|
||||
UPDATE ordr_user SET active = FALSE WHERE id = $1;
|
||||
`
|
||||
Reference in New Issue
Block a user