fix: api base url

This commit is contained in:
Steven 2024-02-27 00:37:33 +08:00
parent 5c02bb98bf
commit 35de611fd1

View File

@ -18,7 +18,7 @@ const useShortcutStore = create(
fetchShortcutList: async (instanceUrl: string, accessToken: string) => { fetchShortcutList: async (instanceUrl: string, accessToken: string) => {
const { const {
data: { shortcuts }, data: { shortcuts },
} = await axios.get<ListShortcutsResponse>(`${instanceUrl}/api/v2/shortcuts`, { } = await axios.get<ListShortcutsResponse>(`${instanceUrl}/api/v1/shortcuts`, {
headers: { headers: {
Authorization: `Bearer ${accessToken}`, Authorization: `Bearer ${accessToken}`,
}, },
@ -36,7 +36,7 @@ const useShortcutStore = create(
createShortcut: async (instanceUrl: string, accessToken: string, create: Shortcut) => { createShortcut: async (instanceUrl: string, accessToken: string, create: Shortcut) => {
const { const {
data: { shortcut }, data: { shortcut },
} = await axios.post<CreateShortcutResponse>(`${instanceUrl}/api/v2/shortcuts`, create, { } = await axios.post<CreateShortcutResponse>(`${instanceUrl}/api/v1/shortcuts`, create, {
headers: { headers: {
Authorization: `Bearer ${accessToken}`, Authorization: `Bearer ${accessToken}`,
}, },