refactor(server): jobs ()

* refactor: job to domain

* chore: regenerate open api

* chore: tests

* fix: missing breaks

* fix: get asset with missing exif data

---------

Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
Jason Rasmussen 2023-03-20 11:55:28 -04:00 committed by GitHub
parent db6b14361d
commit 386eef046d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
68 changed files with 1355 additions and 907 deletions
mobile/openapi/lib/model

View file

@ -24,12 +24,14 @@ class JobCommand {
String toJson() => value;
static const start = JobCommand._(r'start');
static const stop = JobCommand._(r'stop');
static const pause = JobCommand._(r'pause');
static const empty = JobCommand._(r'empty');
/// List of all possible values in this [enum][JobCommand].
static const values = <JobCommand>[
start,
stop,
pause,
empty,
];
static JobCommand? fromJson(dynamic value) => JobCommandTypeTransformer().decode(value);
@ -69,7 +71,8 @@ class JobCommandTypeTransformer {
if (data != null) {
switch (data.toString()) {
case r'start': return JobCommand.start;
case r'stop': return JobCommand.stop;
case r'pause': return JobCommand.pause;
case r'empty': return JobCommand.empty;
default:
if (!allowNull) {
throw ArgumentError('Unknown enum value to decode: $data');