Compare commits

..

2 Commits

3 changed files with 8 additions and 7 deletions

View File

@ -35,10 +35,11 @@ notes
A commits type can be one of the following:
- **feat**: feature
- **fix**: bugfix
- **refactor**: nothing new added but code restructured, etc
- **docs**: documentation changes
- **feat:** feature
- **fix:** bugfix
- **refactor:** nothing new added but code restructured, etc
- **docs:** documentation changes
- **opt:** optimization changes
The commit scope is kinda free, but it's a good idea to use scopes, that have been used before.
Scopes can be nested like this: `scope >> subscope >> subscope`.

View File

@ -19,7 +19,7 @@ impl Backend {
) -> anyhow::Result<anyhow::Result<Uuid, Error>> {
match sqlx::query_as!(
AuthTokensRow,
r#"SELECT * FROM AuthTokens WHERE token = ?;"#,
r#"SELECT * FROM AuthTokens WHERE token = ? LIMIT 1;"#,
token
)
.fetch_one(&self.pool)
@ -49,7 +49,7 @@ impl Backend {
) -> anyhow::Result<anyhow::Result<(), Error>> {
match sqlx::query_as!(
InviteTokensRow,
r#"SELECT * FROM InviteTokens WHERE token = ?;"#,
r#"SELECT * FROM InviteTokens WHERE token = ? LIMIT 1;"#,
token
)
.fetch_one(&self.pool)

View File

@ -90,7 +90,7 @@ impl Backend {
async fn get_user(&self, userid: Uuid) -> Result<Result<User, Error>> {
match sqlx::query_as!(
UsersRow,
r#"SELECT * FROM Users WHERE userid = ?;"#,
r#"SELECT * FROM Users WHERE userid = ? LIMIT 1;"#,
userid.as_bytes().as_slice()
)
.fetch_one(&self.pool)