Skip to content

Commit

Permalink
add deleted = false to get artists details call (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
JwanKhalaf authored Dec 23, 2023
1 parent 03a672b commit 580847c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Bejebeje.Services/Services/ArtistsService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public async Task<ArtistViewModel> GetArtistDetailsAsync(
await using NpgsqlConnection connection = new NpgsqlConnection(_databaseOptions.ConnectionString);
await connection.OpenAsync();

string sqlCommand = @"select a.id as artist_id, a.first_name, a.last_name, aslug.name as artist_slug, a.has_image, a.created_at, a.modified_at, a.is_approved from artists as a inner join artist_slugs as aslug on aslug.artist_id = a.id where case when @user_id <> '' then (a.is_approved = true or a.user_id = @user_id) else a.is_approved = true end and aslug.artist_id = (select artist_id from artist_slugs where name = @artist_slug) and aslug.is_primary = true order by a.first_name asc;";
string sqlCommand = @"select a.id as artist_id, a.first_name, a.last_name, aslug.name as artist_slug, a.has_image, a.created_at, a.modified_at, a.is_approved from artists as a inner join artist_slugs as aslug on aslug.artist_id = a.id where case when @user_id <> '' then (a.is_approved = true or a.user_id = @user_id) else a.is_approved = true end and aslug.artist_id = (select artist_id from artist_slugs where name = @artist_slug) and aslug.is_primary = true and a.is_deleted = false order by a.first_name asc;";

await using NpgsqlCommand command = new NpgsqlCommand(sqlCommand, connection);

Expand Down

0 comments on commit 580847c

Please sign in to comment.