Skip to content

Commit

Permalink
minor fix delete model endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
khansadaoudi committed Feb 28, 2024
1 parent 8fabaf3 commit 4568843
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/parser/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,17 @@ def get(self):
project = ProjectService.get_by_name(project_name)
if project != None:
if ProjectAccessService.check_project_access(project.visibility, project.id):
pretrained_models.append({**model, "language": project.language})
pretrained_models.append({
**model,
"language": project.language,
"admins": ProjectAccessService.get_admins(project.id)
})
return { "status": "success", "data": pretrained_models }

@api.route("/list/<string:project_name>/<string:model_id>")
class ParserModelIdResource(Resource):
def delete(self, project_name: str, model_id: str):
print("<PARSER> list/model_id delete request")
print("<PARSER> list/model_id delete request", project_name, model_id)
return ArboratorParserAPI.delete_model(project_name, model_id)


Expand Down

0 comments on commit 4568843

Please sign in to comment.