-
-
Notifications
You must be signed in to change notification settings - Fork 396
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: refactor + ignore 'null' product_type sent by app (#11032)
I'm hoping this PR will fix openfoodfacts/smooth-app#5864 If we receive product_type=null, we just ignore it. Also refactored the code to remove some duplication.
- Loading branch information
1 parent
d51b6f0
commit 48a5322
Showing
12 changed files
with
182 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...sults/change_product_code_and_product_type/change-product-code-api-v2-normal-account.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"status" : 0, | ||
"status_verbose" : "No permission: product_change_code" | ||
"status_verbose" : "no_permission: product_change_code" | ||
} |
2 changes: 1 addition & 1 deletion
2
...esults/change_product_code_and_product_type/change-product-code-api-v2-not-logged-in.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"status" : 0, | ||
"status_verbose" : "No permission: product_change_code" | ||
"status_verbose" : "no_permission: product_change_code" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ge_product_code_and_product_type/change-product-type-to-beauty-api-v2-normal-account.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"status" : 0, | ||
"status_verbose" : "No permission: product_change_product_type" | ||
"status_verbose" : "no_permission: product_change_product_type" | ||
} |
4 changes: 4 additions & 0 deletions
4
...e_product_code_and_product_type/change-product-type-to-empty-string-api-v2-moderator.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"status" : 1, | ||
"status_verbose" : "fields saved" | ||
} |
4 changes: 4 additions & 0 deletions
4
...ts/change_product_code_and_product_type/change-product-type-to-null-api-v2-moderator.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"status" : 1, | ||
"status_verbose" : "fields saved" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters