Skip to content

Commit

Permalink
FIX: Correct bug in search function
Browse files Browse the repository at this point in the history
  • Loading branch information
adjiap committed Jul 23, 2024
1 parent 4bd85f9 commit a8d9752
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion actions/getSongsByTitle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const getSongsByTitle = async(title: string): Promise<Song[]> => {
const { data, error } = await supabase
.from("songs")
.select("*")
.ilike("title", `%$(title)%`) // Gives a more precise search algorithm
.ilike("title", `%${title}%`) // Gives a more precise search algorithm
.order("created_at", {ascending: false});

if (error){
Expand Down

0 comments on commit a8d9752

Please sign in to comment.