import createAxios from '/@/utils/axios'

export interface SubmittedRewardParams {
    start: string
    end: string
    status: '' | '0' | '1' | '2'
    username: string
    game_id: 268 | 269 | 270
    page: number
}

export function getSubmittedRewards(params: SubmittedRewardParams) {
    return createAxios({
        url: '/admin/user.User/submittedReward',
        method: 'get',
        params,
    })
}

export function editReward(data: { id: number | string; status: 1 | 2 }) {
    return createAxios(
        {
            url: '/admin/user.User/editReward',
            method: 'post',
            data,
        },
        {
            showSuccessMessage: true,
        }
    )
}
