Skip to content

Commit

Permalink
Feat/#166 (#180)
Browse files Browse the repository at this point in the history
* fix: remove unused validate

* fix: add subject into userExam

* feat: create api get all documents by subjectId

* fix: remove validation for author field in DocumentDto

* fix: update response of verifyAccessToken

* fix: update response of verifyAccessToken

* fix: add userInfo into response refreshToken

* fix: add subject to response of getDocumentBySubject api

* feat: create api get a subject by id

* feat: create unique for subject_name

* fix: return code and message error when create duplicate subject

* feat: update auth api for the admin

* fix: refreshToken response

* feat: [update api approve subject]

* fix: error response

* fix: [TOKEN_EXPIRED response]

* feat: [add api update is_approved for admin]

* feat: api create new document for admin

* feat: [Pagination for all of api get all]

* feat: [update metadata(total, currentPage, pageSize) in response]

* fix: [resolve conflict]

* fix: [resolve conflict]

* feat: [default sort with desc]

* feat/#135 (#136)

* feat/#138 (#139)

* feat: allow users outside the organization

* fix: typo

* feat: softDelete

* feat: [delete plugin]

* feat: [api update document & exam by admin and own]

* feat: [Update api documentation and exam by admin and owner]

* feat: [...]

* feat: [:boom:][change the structure, logic, algorithms related to userExam and scoring]

* feat: [...]

* feat: [test workflows]

* feat: [test workflows]

* feat: [test workflows]

* feat: [:zap:][add is_show_info & nickname to user and handle hide userinfo if required]

* fix: [convert pageSize & currentPage from string to number in pipeline]

* fix: [change Dockfile]

* fix: [author array to object in response]

* feat: [...]

* feat/#146 (#151)

* feat: [add questions into response of draft exam]

* fix: return wrong hideUserInfoIfRequired

* fix: missing hideUserInfoIfRequired() in GetAllDocumentByAdmin()

* feat/#155 (#156)

* feat/#155

* fix resolve conflicts [feat/#155]

* fix feat/#155 reslove conflicts

* feat/#160 (#161)

* feat/#160

* fix [feat/#160]

* fix [feat/#160] 2

* fix [feat/#160] 3

* Feat/#162 (#163)

* feat/#162

* fix feat/#162

* feat/#166

* feat/#166 [fix result response of api userExam]

* feat/#166

* feat/#166 [update api result hide UserInfo]

---------

Co-authored-by: nc-minh <[email protected]>
Co-authored-by: Nguyen Cong Minh <[email protected]>
Co-authored-by: Loc Xuan Dao <[email protected]>
  • Loading branch information
4 people authored Apr 22, 2023
1 parent 8af9c9e commit 378988f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/apis/v1/userExam/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,11 @@ export const getUserExamByOwner = async (userEmail: string, userExamId: string)
}

if (userExam[0]?.is_completed) {
return { ...userExam[0], author: hideUserInfoIfRequired(userExam[0]?.author) };
return {
...userExam[0],
author: hideUserInfoIfRequired(userExam[0]?.author),
author_exam: hideUserInfoIfRequired(userExam[0]?.author_exam[0]),
};
}

//duration is in milliseconds
Expand All @@ -360,6 +364,8 @@ export const getUserExamByOwner = async (userEmail: string, userExamId: string)
...userExam[0],
score,
is_completed: true,
author_exam: hideUserInfoIfRequired(userExam[0]?.author_exam[0]),
author: hideUserInfoIfRequired(userExam[0]?.author),
};
}

Expand Down

0 comments on commit 378988f

Please sign in to comment.