Don't pass language to status
This commit is contained in:
@@ -7,7 +7,6 @@ import {
|
|||||||
safeProtectedServiceProcedure,
|
safeProtectedServiceProcedure,
|
||||||
serviceProcedure,
|
serviceProcedure,
|
||||||
} from "@/server/trpc"
|
} from "@/server/trpc"
|
||||||
import { toApiLang } from "@/server/utils"
|
|
||||||
|
|
||||||
import { getBookedHotelRoom } from "@/utils/booking"
|
import { getBookedHotelRoom } from "@/utils/booking"
|
||||||
|
|
||||||
@@ -209,13 +208,11 @@ export const bookingQueryRouter = router({
|
|||||||
.input(getBookingStatusInput)
|
.input(getBookingStatusInput)
|
||||||
.concat(refIdPlugin.toConfirmationNumber)
|
.concat(refIdPlugin.toConfirmationNumber)
|
||||||
.query(async function ({ ctx }) {
|
.query(async function ({ ctx }) {
|
||||||
const { confirmationNumber, lang } = ctx
|
const { confirmationNumber } = ctx
|
||||||
const language = toApiLang(lang)
|
|
||||||
|
|
||||||
const getBookingStatusCounter = createCounter("trpc.booking", "status")
|
const getBookingStatusCounter = createCounter("trpc.booking", "status")
|
||||||
const metricsGetBookingStatus = getBookingStatusCounter.init({
|
const metricsGetBookingStatus = getBookingStatusCounter.init({
|
||||||
confirmationNumber,
|
confirmationNumber,
|
||||||
language,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
metricsGetBookingStatus.start()
|
metricsGetBookingStatus.start()
|
||||||
@@ -226,8 +223,7 @@ export const bookingQueryRouter = router({
|
|||||||
headers: {
|
headers: {
|
||||||
Authorization: `Bearer ${ctx.serviceToken}`,
|
Authorization: `Bearer ${ctx.serviceToken}`,
|
||||||
},
|
},
|
||||||
},
|
}
|
||||||
{ language }
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if (!apiResponse.ok) {
|
if (!apiResponse.ok) {
|
||||||
|
|||||||
Reference in New Issue
Block a user