Skip to content

Commit

Permalink
fix: incorrect user table name
Browse files Browse the repository at this point in the history
  • Loading branch information
dromzeh committed Jul 20, 2023
1 parent 08a460a commit c701615
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/routes/user/getUserByUsername.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const getUserByUsername = async (
const db = await getConnection(env);

const row = await db
.execute("SELECT * FROM user WHERE username = ?", [name])
.execute("SELECT * FROM User WHERE username = ?", [name])
.then((row) => row.rows[0] as User | undefined);

const user = {
Expand Down
2 changes: 1 addition & 1 deletion src/routes/user/getUsersBySearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const getUserBySearch = async (
const db = await getConnection(env);

const row = await db
.execute("SELECT * FROM user WHERE username LIKE ?", [name])
.execute("SELECT * FROM User WHERE username LIKE ?", [name])
.then((row) => row.rows as User[] | undefined);

if (!row) return createNotFoundResponse("User not found", responseHeaders);
Expand Down

0 comments on commit c701615

Please sign in to comment.