import request from "@/axios";

//token
export const getToken = async () => {
    return request({
        url: "/user/getCurrentUser",
        method: "get",
    })
}

/**
 * 登录
 * @param username 
 * @param password 
 */
export const login = async (username: string, password: string) => {
    return request({
        url: "/user/login?username=" + username + '&password=' + password,
        method: "POST",
    })
}