Skip to content

Commit

Permalink
Fix stablekernel#899: Only modify ops keys if they exist
Browse files Browse the repository at this point in the history
  • Loading branch information
point-source committed Oct 1, 2020
1 parent 0af9712 commit c3fe249
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions aqueduct/lib/src/http/managed_object_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -419,12 +419,12 @@ class ManagedObjectController<InstanceType extends ManagedObject>
?.length ??
0) >
0) {
ops["get"].id = "get$entityName";
ops["put"].id = "update$entityName";
ops["delete"].id = "delete$entityName";
ops["get"]?.id = "get$entityName";
ops["put"]?.id = "update$entityName";
ops["delete"]?.id = "delete$entityName";
} else {
ops["get"].id = "get${entityName}s";
ops["post"].id = "create$entityName";
ops["get"]?.id = "get${entityName}s";
ops["post"]?.id = "create$entityName";
}

return ops;
Expand Down

0 comments on commit c3fe249

Please sign in to comment.