You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
642 B

  1. import { AnnotationRepository } from '@/domain/models/tasks/annotationRepository'
  2. import { Seq2seqLabel } from '~/domain/models/tasks/seq2seq'
  3. export class APISeq2seqRepository extends AnnotationRepository<Seq2seqLabel> {
  4. constructor() {
  5. super(Seq2seqLabel)
  6. }
  7. public async update(projectId: string, docId: number, annotationId: number, text: string) {
  8. const url = this.baseUrl(projectId, docId) + `/${annotationId}`
  9. const payload = { text }
  10. await this.request.patch(url, payload)
  11. }
  12. protected baseUrl(projectId: string, docId: number): string {
  13. return `/projects/${projectId}/docs/${docId}/annotations`
  14. }
  15. }