Skip to content

Commit

Permalink
#139 fix project param for rest endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
Kreezag committed Jul 13, 2024
1 parent a4573bf commit ae54d63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/shared/lib/io/use-events-requests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ export const useEventsRequests: TUseEventsRequests = () => {
const { activeProject: project } = storeToRefs(useEventsStore())

const headers = {"X-Auth-Token": token.value }
const getEventRestUrl = (param: string): string => `${REST_API_URL}/api/event/${param}${project ? `?project=${project.value}` : ''}`
const getEventsRestUrl = (): string => `${REST_API_URL}/api/events${project ? `?project=${project.value}` : ''}`
const getEventRestUrl = (param: string): string => `${REST_API_URL}/api/event/${param}${project.value ? `?project=${project.value}` : ''}`
const getEventsRestUrl = (): string => `${REST_API_URL}/api/events${project.value ? `?project=${project.value}` : ''}`

const getAll = () => fetch(getEventsRestUrl(), { headers })
.then((response) => response.json())
Expand Down

0 comments on commit ae54d63

Please sign in to comment.