updated server ip
This commit is contained in:
parent
667634d807
commit
120849a410
21
server.ts
21
server.ts
|
@ -9,6 +9,22 @@ import * as fs from "fs"
|
|||
|
||||
const sw = require("js-sensitivewords")
|
||||
|
||||
/**
|
||||
* The server address without graphql path.
|
||||
*/
|
||||
const serverAddr = "http://47.97.110.29:10443"
|
||||
|
||||
/*
|
||||
|
||||
2023 (c) Explode Team
|
||||
|
||||
This script is licensed under MIT.
|
||||
|
||||
This script is used to create a user-friendly website for registering the accounts of Dynamite Explode,
|
||||
with ability to block users with invalid or illegal names.
|
||||
|
||||
*/
|
||||
|
||||
initSensitiveWordList()
|
||||
|
||||
const app = express()
|
||||
|
@ -66,6 +82,7 @@ app.post("/register", async (req: Request, res: Response) => {
|
|||
return res.status(500).send("出错啦,注册失败了。")
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
return res.status(500).send("服务器错误,请联系管理员!")
|
||||
}
|
||||
})
|
||||
|
@ -82,7 +99,8 @@ type HasId = {
|
|||
|
||||
async function explode_graphql<T>(query: string) {
|
||||
return _axios.post<T>(
|
||||
"http://34.92.242.92:10443/graphql",
|
||||
`${serverAddr}/graphql`,
|
||||
// "http://192.168.1.199:10443/graphql",
|
||||
JSON.stringify({
|
||||
operationName: "",
|
||||
query: query,
|
||||
|
@ -97,6 +115,7 @@ async function explode_graphql<T>(query: string) {
|
|||
}
|
||||
|
||||
async function explode_register(username: string, password: string) {
|
||||
console.log(`Registering ${username}`)
|
||||
let response = await explode_graphql<{
|
||||
data: {
|
||||
registerUser: HasId
|
||||
|
|
Loading…
Reference in New Issue