fix: unbreak toApiLang call that failed everytime
This commit is contained in:
committed by
Michael Zetterberg
parent
30c7eb07fa
commit
6d869ceba7
@@ -483,20 +483,18 @@ export const bookingMutationRouter = router({
|
||||
update: safeProtectedServiceProcedure
|
||||
.input(updateBookingInput)
|
||||
.mutation(async function ({ ctx, input }) {
|
||||
const accessToken = ctx.serviceToken
|
||||
const accessToken = ctx.session?.token.access_token || ctx.serviceToken
|
||||
const { confirmationNumber, ...body } = input
|
||||
|
||||
updateBookingCounter.add(1, { confirmationNumber })
|
||||
|
||||
const headers = {
|
||||
Authorization: `Bearer ${accessToken}`,
|
||||
}
|
||||
|
||||
const apiResponse = await api.put(
|
||||
api.endpoints.v1.Booking.booking(confirmationNumber),
|
||||
{
|
||||
headers,
|
||||
body: body,
|
||||
body,
|
||||
headers: {
|
||||
Authorization: `Bearer ${accessToken}`,
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user