import request from '../libs/request';

const res = 'User';

export default {
    get(id) {
        return request({
            url: `api/${res}/get`,
            method: 'get',
            params: {
                id
            }
        });
    },
    login(data) {
        return request({
            url: `api/${res}/login`,
            method: 'post',
            data
        });
    },
    resetPassword(id) {
        return request({
            url: `api/${res}/resetPassword`,
            method: 'get',
            params: {
                userID: id
            }
        });
    },
    updatePassword(data) {
        return request({
            url: `api/${res}/updatePassword`,
            method: 'post',
            data
        });
    },
    updateUser(data) {
        return request({
            url: `api/${res}/updateUserInfo`,
            method: 'put',
            data
        });
    }
};
