Skip to content

Commit

Permalink
added Get, Get pending accounts, and Post
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip-Jian committed Nov 23, 2023
1 parent 5582868 commit d311343
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
18 changes: 17 additions & 1 deletion server/queries/users.sql
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,20 @@ WHERE
DELETE FROM
users
WHERE
id = ?;
id = ?;

-- GET - Returns all data from the Users table
SELECT * FROM
Users;

-- GET/pending-accounts - Returns all data from Users table who are currently pending approval
SELECT * FROM
Users
WHERE
approved = false;

-- POST - Adds a new row into Users table
INSERT INTO
Users (id, email, "type", approved)
VALUES
(?,?,?,?);

0 comments on commit d311343

Please sign in to comment.