chore(nc-gui): remove as any typecasts wherever possible

This commit is contained in:
braks
2022-09-13 16:34:15 +02:00
parent 2b780cc3e0
commit 3320453637
31 changed files with 242 additions and 144 deletions

View File

@@ -35,8 +35,7 @@ const loadBase = async () => {
try {
if (!project.value.id) return
// todo: response is missing roles in type
const res = (await $api.project.sharedBaseGet(project.value.id)) as any
const res = await $api.project.sharedBaseGet(project.value.id)
base = {
uuid: res.uuid,
@@ -52,10 +51,9 @@ const createShareBase = async (role = ShareBaseRole.Viewer) => {
try {
if (!project.value.id) return
// todo: return type void?
const res = (await $api.project.sharedBaseUpdate(project.value.id, {
const res = await $api.project.sharedBaseUpdate(project.value.id, {
roles: role,
})) as any
})
base = res ?? {}
base!.role = role