fix: type
This commit is contained in:
parent
b65839d0d7
commit
19b772f8ee
1 changed files with 1 additions and 3 deletions
|
@ -80,7 +80,7 @@ import CaldavTokenModel from '@/models/caldavToken'
|
||||||
|
|
||||||
const service = new CaldavTokenService()
|
const service = new CaldavTokenService()
|
||||||
|
|
||||||
async function useToken() {
|
async function useToken(): ref<CaldavTokenModel[]> {
|
||||||
const tokens = ref<CaldavTokenModel[]>([])
|
const tokens = ref<CaldavTokenModel[]>([])
|
||||||
tokens.value = await service.getAll()
|
tokens.value = await service.getAll()
|
||||||
return tokens
|
return tokens
|
||||||
|
@ -108,9 +108,7 @@ const createToken = async () => {
|
||||||
const deleteToken = async (token: CaldavTokenModel) => {
|
const deleteToken = async (token: CaldavTokenModel) => {
|
||||||
const r = await service.delete(token)
|
const r = await service.delete(token)
|
||||||
success(r)
|
success(r)
|
||||||
// @ts-ignore
|
|
||||||
const i = tokens.value.findIndex(v => v.id === token.id)
|
const i = tokens.value.findIndex(v => v.id === token.id)
|
||||||
// @ts-ignore
|
|
||||||
tokens.value.splice(i, 1)
|
tokens.value.splice(i, 1)
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue