diff --git a/src/frontend/js/api/joanie/joanieLegacyClient.ts b/src/frontend/js/api/joanie/joanieLegacyClient.ts index c7834a763c..c087a58399 100644 --- a/src/frontend/js/api/joanie/joanieLegacyClient.ts +++ b/src/frontend/js/api/joanie/joanieLegacyClient.ts @@ -283,25 +283,6 @@ const API = (): Joanie.API => { method: 'DELETE', }).then(checkStatus), }, - addresses: { - get: (id?: string) => { - return fetchWithJWT(buildApiUrl(ROUTES.user.addresses.get, { id })).then(checkStatus); - }, - create: async (payload) => - fetchWithJWT(ROUTES.user.addresses.create, { - method: 'POST', - body: JSON.stringify(payload), - }).then(checkStatus), - update: async ({ id, ...address }) => - fetchWithJWT(ROUTES.user.addresses.update.replace(':id', id), { - method: 'PUT', - body: JSON.stringify(address), - }).then(checkStatus), - delete: async (id) => - fetchWithJWT(ROUTES.user.addresses.delete.replace(':id', id), { - method: 'DELETE', - }).then(checkStatus), - }, orders: { abort: async ({ id, payment_id }) => { return fetchWithJWT(ROUTES.user.orders.abort.replace(':id', id), { diff --git a/src/frontend/js/types/Joanie.ts b/src/frontend/js/types/Joanie.ts index 911a8ed062..cc07aaf696 100644 --- a/src/frontend/js/types/Joanie.ts +++ b/src/frontend/js/types/Joanie.ts @@ -372,19 +372,6 @@ export interface CreditCard { title?: string; } -// Address -export interface Address { - address: string; - city: string; - country: string; - first_name: string; - last_name: string; - id: string; - is_main: boolean; - postcode: string; - title: string; -} - // Wishlist export interface CourseWish extends Resource { status: boolean; @@ -415,10 +402,6 @@ export interface OrderPaymentInfo { } // - API -export interface AddressCreationPayload extends Omit
{ - is_main?: boolean; -} - interface AbstractOrderProductCreationPayload { product_id: Product['id']; order_group_id?: OrderGroup['id']; @@ -441,7 +424,7 @@ interface OrderAbortPayload { interface OrderSubmitPayload { id: Order['id']; - billing_address: Omit; + billing_address: Omit