Skip to content

Commit

Permalink
fix(audit): use correct endpoint for retrieve (#3578)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewelwell authored Mar 7, 2024
1 parent 70a1662 commit 5f98b1b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/common/services/useAuditLogItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const auditLogItemService = service
>({
providesTags: (res) => [{ id: res?.id, type: 'AuditLogItem' }],
query: (query: Req['getAuditLogItem']) => ({
url: `audit/${query.id}/`,
url: `projects/${query.projectId}/audit/${query.id}/`,
}),
}),
// END OF ENDPOINTS
Expand Down
5 changes: 4 additions & 1 deletion frontend/common/types/requests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,10 @@ export type Req = {
environmentId: string
data: { name: string }
}
getAuditLogItem: { id: string }
getAuditLogItem: {
projectId: string
id: string
}
getProject: { id: string }
// END OF TYPES
}
1 change: 1 addition & 0 deletions frontend/web/components/pages/AuditLogItemPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ type AuditLogItemPageType = {
const AuditLogItemPage: FC<AuditLogItemPageType> = ({ match }) => {
const { data, error, isLoading } = useGetAuditLogItemQuery({
id: match.params.id,
projectId: match.params.projectId
})

const index = (ProjectStore.getEnvs() as Environment[] | null)?.findIndex(
Expand Down

0 comments on commit 5f98b1b

Please sign in to comment.