Skip to content
Snippets Groups Projects
Commit bcca7f81 authored by Konrad Mohrfeldt's avatar Konrad Mohrfeldt :koala:
Browse files

chore: remove unused code

parent 29aa7ce7
No related branches found
No related tags found
No related merge requests found
...@@ -10,29 +10,12 @@ import { defineStore } from 'pinia' ...@@ -10,29 +10,12 @@ import { defineStore } from 'pinia'
import { createSteeringURL } from '@/api' import { createSteeringURL } from '@/api'
import { steeringAuthInit } from '@/stores/auth' import { steeringAuthInit } from '@/stores/auth'
import { Note, Show } from '@/types' import { Note } from '@/types'
type ReadonlyAttrs = 'id' | 'createdAt' | 'createdBy' | 'updatedAt' | 'updatedBy' | 'ownerId' type ReadonlyAttrs = 'id' | 'createdAt' | 'createdBy' | 'updatedAt' | 'updatedBy' | 'ownerId'
export type NewNote = Omit<Note, ReadonlyAttrs>
type NoteCreateData = Omit<Note, ReadonlyAttrs> type NoteCreateData = Omit<Note, ReadonlyAttrs>
type NoteUpdateData = Partial<Omit<Note, ReadonlyAttrs>> type NoteUpdateData = Partial<Omit<Note, ReadonlyAttrs>>
export function newNote(timeslotId: number, show?: Show): NewNote {
return {
timeslotId,
title: '',
summary: '',
content: '',
imageId: null,
cbaId: null,
contributorIds: show?.hostIds ?? [],
languageIds: [],
topicIds: [],
links: [],
tags: [],
}
}
export const useNoteStore = defineStore('notes', () => { export const useNoteStore = defineStore('notes', () => {
const endpoint = createSteeringURL.prefix('notes') const endpoint = createSteeringURL.prefix('notes')
const { api, base } = createExtendableAPI<Note>(endpoint, steeringAuthInit) const { api, base } = createExtendableAPI<Note>(endpoint, steeringAuthInit)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment