import axios from 'axios'
import axiosInstance from './axiosInstance'
import { GenericService } from './GenericService'

class UserService extends GenericService {
    constructor() {
        super('/api/cogentro/cogentro-routes/admin/users')
    }

    loginUser = (email, password, role) =>
        this.post('/api/admin/user/adminLogin', {
            email,
            password,
            role: 'admin',
        })
    loginWithToken = (accessToken) =>
        this.post('/api/admin/user/adminAccessToken', {
            access_token: accessToken,
        })
}

export default new UserService()
