Skip to content

Commit 7a90018

Browse files
committed
Fix bug in publish-ci examples
1 parent c616309 commit 7a90018

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

examples/publish-ci/cra4/src/mocks/handlers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const handlers = [
3636
rest.get('/posts/:id', (req, res, ctx) => {
3737
const { id } = req.params as { id: string }
3838
state = adapter.updateOne(state, {
39-
id,
39+
id: parseInt(id, 10),
4040
changes: { fetched_at: new Date().toUTCString() },
4141
})
4242
return res(ctx.json(state.entities[id]), ctx.delay(400))

examples/publish-ci/cra5/src/mocks/handlers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const handlers = [
3636
rest.get('/posts/:id', (req, res, ctx) => {
3737
const { id } = req.params as { id: string }
3838
state = adapter.updateOne(state, {
39-
id,
39+
id: parseInt(id, 10),
4040
changes: { fetched_at: new Date().toUTCString() },
4141
})
4242
return res(ctx.json(state.entities[id]), ctx.delay(400))

examples/publish-ci/next/src/mocks/handlers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const handlers = [
3636
rest.get('/posts/:id', (req, res, ctx) => {
3737
const { id } = req.params as { id: string }
3838
state = adapter.updateOne(state, {
39-
id,
39+
id: parseInt(id, 10),
4040
changes: { fetched_at: new Date().toUTCString() },
4141
})
4242
return res(ctx.json(state.entities[id]), ctx.delay(400))

examples/publish-ci/vite/src/mocks/handlers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const handlers = [
3636
rest.get('/posts/:id', (req, res, ctx) => {
3737
const { id } = req.params as { id: string }
3838
state = adapter.updateOne(state, {
39-
id,
39+
id: parseInt(id, 10),
4040
changes: { fetched_at: new Date().toUTCString() },
4141
})
4242
return res(ctx.json(state.entities[id]), ctx.delay(400))

0 commit comments

Comments
 (0)