Support for rating system (#10124)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev
2025-10-24 10:10:01 +07:00
committed by GitHub
parent 768ff39ab1
commit ffd8d90378
137 changed files with 5005 additions and 712 deletions
+3 -1
View File
@@ -921,12 +921,14 @@ export async function findFullSocialIds (
): Promise<SocialId[]> {
const { socialIds } = params
const { extra } = decodeTokenVerbose(ctx, token)
verifyAllowedServices(['gmail', 'tool', 'workspace', 'huly-mail'], extra)
verifyAllowedServices(['gmail', 'tool', 'workspace', 'huly-mail', 'rating'], extra)
if (socialIds == null || socialIds.length === 0) {
throw new PlatformError(new Status(Severity.ERROR, platform.status.BadRequest, {}))
}
// Add validation to social Ids
return await db.socialId.find({ _id: { $in: socialIds } })
}
+1
View File
@@ -91,6 +91,7 @@
"@hcengineering/server-guest": "^0.7.0",
"@hcengineering/server-guest-resources": "^0.7.0",
"@hcengineering/server-token": "^0.7.5",
"@hcengineering/server-rating": "^0.7.0",
"@hcengineering/server-controlled-documents": "^0.7.0",
"@hcengineering/server-controlled-documents-resources": "^0.7.0",
"@hcengineering/server-training": "^0.7.0",
+3
View File
@@ -70,6 +70,8 @@ import { generateToken } from '@hcengineering/server-token'
import { createStorageDataAdapter } from './blobStorage'
import { CommunicationMiddleware, type CommunicationApiFactory } from './communication'
import { RatingMiddleware } from '@hcengineering/server-rating'
/**
* @public
*/
@@ -156,6 +158,7 @@ export function createServerPipeline (
UserStatusMiddleware.create,
ApplyTxMiddleware.create, // Extract apply
IdentifierMiddleware.create, // After ApplyTx to ensure that it pass
RatingMiddleware.create, // Rating editing restrictions
TxMiddleware.create, // Store tx into transaction domain
...(opt.disableTriggers === true ? [] : [TriggersMiddleware.create]),
...(opt.fulltextUrl !== undefined