Spaces:
Running
Running
muxi feng
commited on
Commit
·
37caf85
1
Parent(s):
15cfd97
- app/api/user/register/route.ts +1 -1
- app/store/user.ts +2 -2
app/api/user/register/route.ts
CHANGED
@@ -9,7 +9,7 @@ export async function POST(req: NextRequest) {
|
|
9 |
const name=req.nextUrl.searchParams.get("name")
|
10 |
const mail=req.nextUrl.searchParams.get("mail")
|
11 |
const code=req.nextUrl.searchParams.get("code")
|
12 |
-
let res=await fetch("
|
13 |
method: "GET"
|
14 |
})
|
15 |
let msg=await res.json()
|
|
|
9 |
const name=req.nextUrl.searchParams.get("name")
|
10 |
const mail=req.nextUrl.searchParams.get("mail")
|
11 |
const code=req.nextUrl.searchParams.get("code")
|
12 |
+
let res=await fetch("http://shuixian.ltd/main/api/user/register.php?admin="+admin+"&key="+key+"&user="+user+"&password="+password+"&name="+name+"&mail="+mail+"&code="+code, {
|
13 |
method: "GET"
|
14 |
})
|
15 |
let msg=await res.json()
|
app/store/user.ts
CHANGED
@@ -140,8 +140,8 @@ export const useUserStore = create<UserStore>()(
|
|
140 |
}
|
141 |
},
|
142 |
async register(user, password, name, mail, code) {
|
143 |
-
let res=await fetch("
|
144 |
-
method: "
|
145 |
});
|
146 |
let response = await res.json() as shuixianRes
|
147 |
console.log(response)
|
|
|
140 |
}
|
141 |
},
|
142 |
async register(user, password, name, mail, code) {
|
143 |
+
let res=await fetch("/api/user/register?user="+user+"&password="+password+"&name="+name+"&mail="+mail+"&code="+code,{
|
144 |
+
method: "POST"
|
145 |
});
|
146 |
let response = await res.json() as shuixianRes
|
147 |
console.log(response)
|