Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
seveibar committed Oct 13, 2024
1 parent ab234e2 commit 48e7da4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions fake-snippets-api/lib/db/db-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,11 @@ const initializer = combine(databaseSchema.parse({}), (set, get) => ({
searchSnippets: (query: string): Snippet[] => {
const state = get()
const lowercaseQuery = query.toLowerCase()
return state.snippets.filter((snippet) =>
snippet.name.toLowerCase().includes(lowercaseQuery) ||
snippet.description?.toLowerCase().includes(lowercaseQuery) ||
snippet.code.toLowerCase().includes(lowercaseQuery)
return state.snippets.filter(
(snippet) =>
snippet.name.toLowerCase().includes(lowercaseQuery) ||
snippet.description?.toLowerCase().includes(lowercaseQuery) ||
snippet.code.toLowerCase().includes(lowercaseQuery),
)
},
addSession: (session: Omit<Session, "session_id">): Session => {
Expand Down

0 comments on commit 48e7da4

Please sign in to comment.