Revert "feat: 用户登录使用mock api, 可以使用test用户登录 (#233)"

This commit is contained in:
xiaoxian521
2022-04-10 20:32:18 +08:00
parent dc219ed11a
commit 91df7349f4
5 changed files with 14 additions and 48 deletions

View File

@@ -1,23 +0,0 @@
import { MockMethod } from "vite-plugin-mock";
export default [
{
url: "/login",
method: "post",
response: ({ body }) => {
if (body.username === "admin") {
return {
username: "admin",
expires: 24 * 60 * 60,
accessToken: "eyJhbGciOiJIUzUxMiJ9.admin"
};
} else {
return {
username: "test",
expires: 24 * 60 * 60,
accessToken: "eyJhbGciOiJIUzUxMiJ9.test"
};
}
}
}
] as MockMethod[];