1- import { http , delay , HttpResponse , StrictResponse } from "msw"
1+ import { http , delay , HttpResponse } from "msw"
22import { API_URL } from "@/constants/api"
33import { ADMIN_QUOTE_BY_ID , ADMIN_QUOTE_PENDING , ADMIN_QUOTE } from "@/constants/endpoints"
44import {
@@ -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