add song request

This commit is contained in:
2023-11-17 22:18:27 +08:00
parent 2d9325821f
commit cb03299a99
15 changed files with 1737 additions and 418 deletions

View File

@@ -1,5 +1,5 @@
import { ACCOUNT_API_URL, BASE_API } from '@/data/constants'
import { APIRoot, AccountInfo } from './api-models'
import { APIRoot, AccountInfo, FunctionTypes } from './api-models'
import { QueryPostAPI } from '@/api/query'
import { ref } from 'vue'
import { useLocalStorage } from '@vueuse/core'
@@ -47,6 +47,12 @@ function refreshCookie() {
}
})
}
export async function SaveAccountSettings() {
return await QueryPostAPI(ACCOUNT_API_URL + 'update-setting', ACCOUNT.value?.settings)
}
export async function SaveEnableFunctions(functions: FunctionTypes[]) {
return await QueryPostAPI(ACCOUNT_API_URL + 'update-enable-functions', functions)
}
export function useAccount() {
return ACCOUNT
}