Verified Commit 3ace4573 authored by Kristyna Pekarkova's avatar Kristyna Pekarkova Committed by Peter Stanko
Browse files

Added method for review item versions

parent 0056fe22
......@@ -380,3 +380,23 @@ class SubmissionReviewItem(CustomResource):
item = self.find.review_item(rid)
review =
return SCHEMAS.dump('review', review), 204
@submissions_namespace.param('sid', 'Submission id')
@submissions_namespace.param('rid', 'Review item id')
@submissions_namespace.response(404, 'Submissions not found')
@submissions_namespace.response(404, 'Review item not found')
class SubmissionReviewItemVersions(CustomResource):
def get(self, sid: str, rid: str):
submission = self.find.submission(sid)
course = submission.project.course
log.debug(f"[REST] Get submission review versions"
f" by {self.client.log_name}: {submission.log_name}")
item = self.find.review_item(rid)
versions = item.versions.all()
return SCHEMAS.dump('review_items', versions)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment