fix(chalice): added get note by id (#3069)
This commit is contained in:
parent
e2fa3c91e2
commit
4e54bced9c
1 changed files with 12 additions and 0 deletions
|
|
@ -503,6 +503,18 @@ def comment_assignment(projectId: int, sessionId: int, issueId: str,
|
|||
}
|
||||
|
||||
|
||||
@app.get('/{projectId}/notes/{noteId}', tags=["sessions", "notes"],
|
||||
dependencies=[OR_scope(Permissions.SESSION_REPLAY)])
|
||||
def get_note_by_id(projectId: int, noteId: int, context: schemas.CurrentContext = Depends(OR_context)):
|
||||
data = sessions_notes.get_note(tenant_id=context.tenant_id, project_id=projectId, note_id=noteId,
|
||||
user_id=context.user_id)
|
||||
if "errors" in data:
|
||||
return data
|
||||
return {
|
||||
'data': data
|
||||
}
|
||||
|
||||
|
||||
@app.post('/{projectId}/sessions/{sessionId}/notes', tags=["sessions", "notes"],
|
||||
dependencies=[OR_scope(Permissions.SESSION_REPLAY)])
|
||||
def create_note(projectId: int, sessionId: int, data: schemas.SessionNoteSchema = Body(...),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue