mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-04 23:17:12 +01:00
update mongoose to 5.8.3 (lots of types changes)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { MILAGE_TARIFS } from '../db/enums'
|
||||
import { AdditionalCost, Bill } from '../db/bill'
|
||||
import { IAdditionalCost, IBill } from '../db/bill'
|
||||
import fetch from './fetch'
|
||||
|
||||
function roundToCent(amount: number): number {
|
||||
@@ -61,7 +61,7 @@ export function getBillTotal({
|
||||
}: {
|
||||
tarif: MILAGE_TARIFS
|
||||
milage?: number
|
||||
additionalCosts: AdditionalCost[]
|
||||
additionalCosts: IAdditionalCost[]
|
||||
}): number {
|
||||
const milageCosts = getMilageCosts({ tarif, km: milage })
|
||||
const additionalCostsSum = additionalCosts
|
||||
@@ -73,8 +73,8 @@ export function getBillTotal({
|
||||
|
||||
export async function createBill(
|
||||
bookingUuid: string,
|
||||
bill: Bill
|
||||
): Promise<Bill> {
|
||||
bill: IBill
|
||||
): Promise<IBill> {
|
||||
return fetch(`/api/bookings/${bookingUuid}/bill`, {
|
||||
method: 'POST',
|
||||
body: bill,
|
||||
@@ -83,8 +83,8 @@ export async function createBill(
|
||||
|
||||
export async function patchBill(
|
||||
bookingUuid: string,
|
||||
bill: Bill
|
||||
): Promise<Bill> {
|
||||
bill: IBill
|
||||
): Promise<IBill> {
|
||||
return fetch(`/api/bookings/${bookingUuid}/bill`, {
|
||||
method: 'POST',
|
||||
body: bill,
|
||||
|
||||
Reference in New Issue
Block a user