refactor: comment out collaborator ID update logic in CollaborationSessionSchema
- Temporarily disable the logic that adds the current user's ID to the collaboratorsIds array if not already included. - This change is aimed at revisiting the collaboration session management without altering the existing functionality for customer role access.
This commit is contained in:
@@ -88,17 +88,17 @@ export class CollaborationSessionSchema extends PothosSchema {
|
|||||||
/* ---------- use case 1 : customer get collaboration session by id --------- */
|
/* ---------- use case 1 : customer get collaboration session by id --------- */
|
||||||
if (ctx.http.me?.role === Role.CUSTOMER && collaborationSession) {
|
if (ctx.http.me?.role === Role.CUSTOMER && collaborationSession) {
|
||||||
// if collaboratorsIds not include current user id, add it
|
// if collaboratorsIds not include current user id, add it
|
||||||
if (!collaborationSession.collaboratorsIds.includes(ctx.http.me?.id)) {
|
// if (!collaborationSession.collaboratorsIds.includes(ctx.http.me?.id)) {
|
||||||
collaborationSession.collaboratorsIds.push(ctx.http.me?.id)
|
// collaborationSession.collaboratorsIds.push(ctx.http.me?.id)
|
||||||
await this.prisma.collaborationSession.update({
|
// await this.prisma.collaborationSession.update({
|
||||||
where: {
|
// where: {
|
||||||
id: collaborationSession.id,
|
// id: collaborationSession.id,
|
||||||
},
|
// },
|
||||||
data: {
|
// data: {
|
||||||
collaboratorsIds: collaborationSession.collaboratorsIds,
|
// collaboratorsIds: collaborationSession.collaboratorsIds,
|
||||||
},
|
// },
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
return collaborationSession
|
return collaborationSession
|
||||||
}
|
}
|
||||||
/* ---------- use case 2 : center mentor get collaboration session by schedule date id --------- */
|
/* ---------- use case 2 : center mentor get collaboration session by schedule date id --------- */
|
||||||
|
|||||||
Reference in New Issue
Block a user