mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-27 20:14:57 +02:00
Support for rating system (#10124)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
@@ -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 } })
|
||||
}
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user