-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(chat-service): setup chat microservice #109
Conversation
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Please add a sandbox example integration for this. @rashisf |
async getMessage( | ||
@param.path.string('id') id: typeof MessageRecipient.prototype.id, | ||
): Promise<Message> { | ||
return this.messageRecipientRepository.message(id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would always fetch a single message, but ideally a recipient could exist in multiple messages?
ValueOrPromise, | ||
} from '@loopback/core'; | ||
import {juggler} from '@loopback/repository'; | ||
import config from './pgdb.datasource.config.json'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to fetch such configs from environment.
name: 'channel_id', | ||
required: true, | ||
}) | ||
channelId: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How are the channels created and mantained?
name: 'channel_id', | ||
required: true, | ||
}) | ||
channelId: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as in case of recipient, how is channel Id created and maintained?
recipientId: string; | ||
|
||
@belongsTo( | ||
() => Message, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But Recipient could belong to multiple messages? This is related to the remark in the controller.
@@ -0,0 +1 @@ | |||
export * from './component'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Export keys, types, models and repositories as well so the parent application could use those to extend the functionality in this service.
@rashisf Would you be able to fix the comments or would you prefer if someone else take this forward ? |
8fc16df
to
933a042
Compare
@ashutosh-bansal-2136 can u attach DB schema as part of PR description please ? |
fix code smells |
.cz-config.js
Outdated
@@ -37,6 +37,7 @@ module.exports = { | |||
{name: 'video-conferencing-service'}, | |||
{name: 'audit-service'}, | |||
{name: 'sandbox'}, | |||
{name: 'chat-service'}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add this in the .czferc.js instead of .cz-config.js.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I must have missed removing this file, so if possible, remove this file as well, as it's no longer needed.
} | ||
``` | ||
|
||
### Migrations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you check in one of the other services to see how we provide migrations, and follow that.
services/chat-service/package.json
Outdated
"eslint-plugin-mocha": "^6.3.0", | ||
"nyc": "^15.1.0", | ||
"source-map-support": "^0.5.16", | ||
"typescript": "~3.8.3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update the packages to ensure compatibility with other sourceloop services and core.
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
SFO-167
Description
Base Setup for Chat Microservice
Fixes #145
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist: