Skip to content

Commit b7a17de

Browse files
committed
Address warnings
1 parent 1080382 commit b7a17de

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/mocks/handlers/admin_quotes.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { http, delay, HttpResponse, StrictResponse } from "msw"
1+
import { http, delay, HttpResponse } from "msw"
22
import { API_URL } from "@/constants/api"
33
import { ADMIN_QUOTE_BY_ID, ADMIN_QUOTE_PENDING, ADMIN_QUOTE } from "@/constants/endpoints"
44
import {
@@ -54,7 +54,8 @@ export const fetchAdminLookupQuote = http.get<never, never, AdminLookupQuoteResp
5454

5555
const data = db.quotes.getAll().filter((it) => it.id === id)
5656
if (data.length === 0) {
57-
return HttpResponse.json(null, { status: 404 }) as unknown as StrictResponse<InfoReply>
57+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
58+
return HttpResponse.json(null, { status: 404 })
5859
}
5960

6061
return HttpResponse.json(data[0] as InfoReply)
@@ -71,15 +72,16 @@ export const updateAdminQuote = http.post<never, UpdateQuoteRequest>(
7172

7273
const data = db.quotes.getAll().filter((it) => it.id === id)
7374
if (data.length === 0) {
74-
return HttpResponse.json(null, { status: 404 }) as unknown as StrictResponse<InfoReply>
75+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
76+
return HttpResponse.json(null, { status: 404 })
7577
}
7678

7779
const quote = data[0]
7880

79-
if (body.action === "deny") {
81+
if (body.action === "Deny") {
8082
quote.status = "denied"
8183
}
82-
if (body.action === "offer") {
84+
if (body.action === "Offer") {
8385
quote.status = "offered"
8486
quote.ttl = body.ttl ?? null
8587
// TODO: not yet impelemnted: quote.discount = body.discount ?? null

0 commit comments

Comments
 (0)