summaryrefslogtreecommitdiff
path: root/src/lib/promotinProgram/api/homepageApi.js
blob: 496af9d6f7d102ce04a710d4a15ff69e35fafb81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import odooApi from "@/core/api/odooApi"

export const getPromotionHome = async () => {
    const response = await odooApi('GET', '/api/v1/promotion/home')
    return response
}

export const getProductPromotionHome = async ({id}) => {
    const response = await odooApi('GET', `/api/v1/promotion/home/${id}`)
    return response
}

export const getPromotionProgram = async ({ id }) => {
    const listProgram = await odooApi('GET', `/api/v1/product_variant/${id}/promotions`)
  
    return listProgram
}