mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
refactor(server): jobs (#2023)
* 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:
9
mobile/openapi/lib/model/job_command.dart
generated
9
mobile/openapi/lib/model/job_command.dart
generated
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user