Skip to content

Commit

Permalink
Cleanup code
Browse files Browse the repository at this point in the history
  • Loading branch information
vdegraaf committed Jan 16, 2025
1 parent df9e9ea commit 10a4d8b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 3 additions & 0 deletions apps/public/src/mocks/api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const PDOK_REVERSE = `https://api.pdok.nl/bzk/locatieserver/search/v3_1/reverse`

export const MELDING_ATTACHMENT_BY_ID = `/melding/:id/attachment`
10 changes: 7 additions & 3 deletions apps/public/src/mocks/handlers.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { http, HttpResponse } from 'msw'

import * as API from './api'

export const handlers = [
http.get('https://api.pdok.nl/bzk/locatieserver/search/v3_1/reverse', () =>
/* GET * */
http.get(API.PDOK_REVERSE, () =>
HttpResponse.json({
response: {
numFound: 1,
Expand All @@ -21,9 +24,10 @@ export const handlers = [
}),
),

http.post('/melding/2/attachment', () =>
/* POST * */
http.post(API.MELDING_ATTACHMENT_BY_ID, () =>
HttpResponse.json({
id: 1,
id: 2,
original_filename: 'example.png',
filename: 'example.png',
created_at: '2021-10-14T14:05:41.000000Z',
Expand Down

0 comments on commit 10a4d8b

Please sign in to comment.