Skip to content

Commit 1fcbb2c

Browse files
feat: update moyu api url
1 parent 51f10ef commit 1fcbb2c

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/server.js

+1-6
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,7 @@ router.post('/', async (request, env) => {
7474
});
7575
}
7676
case MO_COMMAND.name.toLowerCase(): {
77-
const response = await fetch(`${env.API_URL}/moyu`, {
78-
method: 'GET',
79-
headers: {
80-
"Content-Type": "application/json",
81-
}
82-
});
77+
const response = await fetch(env.MOYU_URL);
8378
const text = await response.text();
8479
return new JsonResponse({
8580
type: InteractionResponseType.CHANNEL_MESSAGE_WITH_SOURCE,

wrangler.toml

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ routes = [
77

88
[vars]
99
API_URL = "https://awsl.api.awsl.icu"
10+
MOYU_URL = "https://moyu.awsl.icu/api/moyu_txt"
1011

1112
# [secrets]
1213
# DISCORD_TOKEN

0 commit comments

Comments
 (0)