Skip to content

Commit c831306

Browse files
committed
fix dropbox callback uri
1 parent 832b323 commit c831306

File tree

4 files changed

+4
-9
lines changed

4 files changed

+4
-9
lines changed

docs/.vuepress/components/aliyundrive/Callback.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ interface Token {
1818
1919
const token = ref<Token>();
2020
21-
// const api = "http://localhost:3000"
22-
2321
const getToken = async () => {
2422
const resp = await fetch(api() + `/alist/ali_open/code`, {
2523
method: "POST",

docs/.vuepress/components/api/ApiSelect.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script setup lang="ts">
22
import { NSelect } from "naive-ui";
3-
import { computed, ref, watch } from "vue";
3+
import { ref, watch } from "vue";
44
import { apis, defaultApi } from ".";
55
import NaiveClient from "../NaiveClient.vue";
66

docs/.vuepress/components/dropbox/Callback.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
<script lang="ts" setup>
2-
import { NAlert, NButton, NInput, NSpace, NSpin } from "naive-ui";
2+
import { NAlert, NInput, NSpace, NSpin } from "naive-ui";
33
import { reactive } from "vue";
44
import { api } from "../api";
55
6-
const cur = "http://localhost:8080";
7-
const redirect_uri = `${cur}/tool/dropbox/callback`;
6+
const redirect_uri = `${location.origin}/tool/dropbox/callback`;
87
98
const url = new URL(window.location.href);
109
const code = url.searchParams.get("code");

docs/.vuepress/components/dropbox/Request.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
import { NInput, NSelect, NButton, NSpace, NCheckbox } from "naive-ui";
33
import { ref } from "vue";
44
5-
const cur = "http://localhost:8080";
6-
75
const client = ref({
86
id: "76lrwrklhdn1icb",
97
secret: "",
@@ -19,7 +17,7 @@ const getToken = () => {
1917
const url = new URL(`https://www.dropbox.com/oauth2/authorize`);
2018
url.searchParams.set("client_id", client.value.id);
2119
url.searchParams.set("response_type", "code");
22-
url.searchParams.set("redirect_uri", `${cur}/tool/dropbox/callback`);
20+
url.searchParams.set("redirect_uri", `${location.origin}/tool/dropbox/callback`);
2321
url.searchParams.set("token_access_type", "offline");
2422
url.searchParams.set(
2523
"state",

0 commit comments

Comments
 (0)