Skip to content

Commit

Permalink
Minor bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
NadavTasher committed Jan 27, 2024
1 parent 59fe6c4 commit ffb920c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
image/Dockerfile-*
image/Dockerfile-*
image/Dockerfile
4 changes: 3 additions & 1 deletion image/src/backend/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ def wrapper(**kwargs):
# Create error response from exception
return str(exception), 500

# Decide the endpoint name
endpoint = options.pop("endpoint", rule + repr(options.get("methods")))

# Register the wrapper function
endpoint = options.pop("endpoint", None)
self.add_url_rule(rule, endpoint, wrapper, **options)

# Return the original function
Expand Down
5 changes: 4 additions & 1 deletion image/src/frontend/modules/api/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ class API {
static async call(action, parameters = {}) {
// Execute request using fetch
const response = await fetch(`api/${action}`, {
method: "post",
method: "POST",
body: JSON.stringify(parameters),
headers: {
"Content-Type": "application/json",
},
});

// Check response status code
Expand Down

0 comments on commit ffb920c

Please sign in to comment.