Skip to content

TaskView is a self-hosted project and task management platform focused on clarity, ownership, and control. TaskView is built for teams that want a transparent, self-hosted alternative to SaaS task managers.

535 B
Raw Blame
import TvApiBase from './base'
import type { AppResponse } from './base.types'
import type { UiPreferences } from './ui-preferences.types'

export default class TvUiPreferencesApi extends TvApiBase {
  protected moduleUrl = '/module/ui-preferences'

  public async fetch() {
    return this.request(
      this.$axios.get<AppResponse<UiPreferences>>(this.moduleUrl),
    )
  }

  public async update(prefs: UiPreferences) {
    return this.request(
      this.$axios.put<AppResponse<UiPreferences>>(this.moduleUrl, prefs),
    )
  }
}