diff options
author | 2024-11-14 21:43:54 +0000 | |
---|---|---|
committer | 2024-11-14 21:43:54 +0000 | |
commit | 67b54449a1bbde257e9454419e7bb70ebc515c0f (patch) | |
tree | e23710c2d1f5d219205f26af727b478e455a0071 /src/db/artists.rs | |
parent | 469a3ad33914f7eff6edc9ca7fabb12f2950da84 (diff) | |
download | critch-main.tar.gz critch-main.tar.bz2 critch-main.zip |
Diffstat (limited to 'src/db/artists.rs')
-rw-r--r-- | src/db/artists.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/db/artists.rs b/src/db/artists.rs index 043f0bd..08a5968 100644 --- a/src/db/artists.rs +++ b/src/db/artists.rs @@ -13,7 +13,7 @@ impl Artists { pub async fn create(&self, artist: Artist) -> Result<i32> { let artist_id = sqlx::query!( - "insert into artists (handle, name, bio, site) values ($1, $2, $3, $4) returning id", + "insert into artists (handle, name, bio, site) values ($1, $2, $3, $4) returning artist_id", artist.handle, artist.name, artist.bio, @@ -21,7 +21,7 @@ impl Artists { ) .fetch_one(&self.0) .await? - .id; + .artist_id; Ok(artist_id) } |