import service from '@/utils/service'

const baseUrl = process.env.VUE_APP_HOST + '/manager/api';

const feedbackApi = {};

feedbackApi.baseUrl = baseUrl;

feedbackApi.getGameList = () => {
    return service({
        url: `${baseUrl}/feedback/game/list`,
        method: 'get'
    })
};


feedbackApi.getFeedbackGameList = () => {
    return service({
        url: `${baseUrl}/feedback/v1/list`,
        method: 'get',
        params: {deleted: 0}
    })
};

feedbackApi.getFeedbackGameById = id => {
    return service({
        url: `${baseUrl}/feedback/v1/${id}`,
        method: 'get',
    })
};

feedbackApi.addFeedbackGame = data => {
    return service({
        url: `${baseUrl}/feedback/v1`,
        method: 'post',
        data: data
    })
};

feedbackApi.updateFeedbackGame = data => {
    return service({
        url: `${baseUrl}/feedback/v1`,
        method: 'put',
        data: data
    })
};

feedbackApi.deleteFeedbackGame = id => {
    return service({
        url: `${baseUrl}/feedback/v1/${id}`,
        method: 'delete',
    })
};

feedbackApi.getFeedbackList = params => {
    return service({
        url: `${baseUrl}/feedbackServer/v1/page`,
        method: 'get',
        params: params
    })
};


feedbackApi.getFeedbackById = id => {
    return service({
        url: `${baseUrl}/feedbackServer/v1/${id}`,
        method: 'get',
    })
};

feedbackApi.updateFeedback = data => {
    return service({
        url: `${baseUrl}/feedbackServer/v1`,
        method: 'put',
        data: data
    })
};


export default feedbackApi
