mirror of
https://github.com/immich-app/immich.git
synced 2025-07-13 20:38:46 +02: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:
parent
db6b14361d
commit
386eef046d
68 changed files with 1355 additions and 907 deletions
mobile/openapi/lib/model
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');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue