aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/server-commands/videos/storyboard-command.ts
blob: 06d90fc12c1b9c4adc95ecd81c67caf51213e668 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import { HttpStatusCode, Storyboard } from '@shared/models'
import { AbstractCommand, OverrideCommandOptions } from '../shared'

export class StoryboardCommand extends AbstractCommand {

  list (options: OverrideCommandOptions & {
    id: number | string
  }) {
    const path = '/api/v1/videos/' + options.id + '/storyboards'

    return this.getRequestBody<{ storyboards: Storyboard[] }>({
      ...options,

      path,
      implicitToken: true,
      defaultExpectedStatus: HttpStatusCode.OK_200
    })
  }
}