v6.5(LTS)をリリース
This commit is contained in:
+2
-2
@@ -3,7 +3,7 @@ import config from "../config.js";
|
||||
|
||||
export default async function APICheck() {
|
||||
try {
|
||||
const req = await fetch(`https://${config.uwuzu.host}/api/me`, {
|
||||
const req = await fetch(`https://${config.uwuzu.host}/api/me/`, {
|
||||
method: "POST",
|
||||
body: JSON.stringify({
|
||||
token: config.uwuzu.apiToken,
|
||||
@@ -12,7 +12,7 @@ export default async function APICheck() {
|
||||
|
||||
const res = await req.json();
|
||||
|
||||
if (!res.userid) {
|
||||
if (res.error_code !== undefined) {
|
||||
console.log(styleText("red", "APIトークンあるいはuwuzuサーバーホストが無効です"));
|
||||
process.exit();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user