Skip to content

Commit

Permalink
fix type and use camelCase instead of snake
Browse files Browse the repository at this point in the history
  • Loading branch information
bfauble committed Jan 23, 2025
1 parent 360cef9 commit 9c89314
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion assets/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ export const fetchDetour = (
}).then((v) => map(v, detourStateFromData))

export const deleteDetour = (
id: number | undefined
id: number
): Promise<Result<boolean, never>> => {
return apiCallResult({
url: `/api/detours/${id}`,
Expand Down
6 changes: 3 additions & 3 deletions assets/src/hooks/useDetours.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ const subscribe = (
handleDeactivated(simpleDetourFromData(data))
})
handleDeleted &&
channel.on("deleted", ({ data: detour_id }: { data: unknown }) => {
if (typeof detour_id === "number") {
handleDeleted(detour_id)
channel.on("deleted", ({ data: detourId }: { data: unknown }) => {
if (typeof detourId === "number") {
handleDeleted(detourId)
}
})
channel.on("auth_expired", reload)
Expand Down

0 comments on commit 9c89314

Please sign in to comment.