Skip to content

Commit

Permalink
update user table name
Browse files Browse the repository at this point in the history
  • Loading branch information
dromzeh committed Jul 18, 2023
1 parent 547c19d commit 08a460a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
3 changes: 1 addition & 2 deletions src/lib/listBucket.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export const listBucket = async (bucket, options) => {
const files = await bucket.list(options);
return files;
return await bucket.list(options);
};
5 changes: 1 addition & 4 deletions src/lib/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,9 @@ export const getSearchResults = async (

const db = await getConnection(env);

console.log(sqlQuery, parameters);
const row = await db
return await db
.execute(sqlQuery, parameters)
.then((row) => row.rows as Asset[]);

return row;
};

const addQueryToSqlQuery = (
Expand Down
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 auth_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 auth_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 08a460a

Please sign in to comment.