@servicelabsco/nestjs-utility-services 1.1.67 → 1.1.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,9 @@
|
|
1
|
+
import { SourceColumnDto } from '../../platformUtility';
|
2
|
+
import { CommentEntity } from '../entities/comment.entity';
|
1
3
|
export declare class CommentService {
|
2
4
|
getComments(query: {
|
3
5
|
source_type: string;
|
4
6
|
source_id: number;
|
5
7
|
}): Promise<any[]>;
|
8
|
+
setComment(source: SourceColumnDto, comments: string, is_system_generated?: boolean): Promise<CommentEntity>;
|
6
9
|
}
|
@@ -13,6 +13,14 @@ let CommentService = class CommentService {
|
|
13
13
|
async getComments(query) {
|
14
14
|
return comment_entity_1.CommentEntity.find({ where: query });
|
15
15
|
}
|
16
|
+
async setComment(source, comments, is_system_generated = true) {
|
17
|
+
const record = new comment_entity_1.CommentEntity();
|
18
|
+
record.source_type = source.source_type;
|
19
|
+
record.source_id = source.source_id;
|
20
|
+
record.comments = comments;
|
21
|
+
record.is_system_generated = is_system_generated;
|
22
|
+
return record.save();
|
23
|
+
}
|
16
24
|
};
|
17
25
|
CommentService = __decorate([
|
18
26
|
(0, common_1.Injectable)()
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"comment.service.js","sourceRoot":"","sources":["../../../src/system/services/comment.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;
|
1
|
+
{"version":3,"file":"comment.service.js","sourceRoot":"","sources":["../../../src/system/services/comment.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAE5C,+DAA2D;AAQpD,IAAM,cAAc,GAApB,MAAM,cAAc;IAQvB,KAAK,CAAC,WAAW,CAAC,KAAiD;QAC/D,OAAO,8BAAa,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;IAChD,CAAC;IAUD,KAAK,CAAC,UAAU,CAAC,MAAuB,EAAE,QAAgB,EAAE,mBAAmB,GAAG,IAAI;QAClF,MAAM,MAAM,GAAG,IAAI,8BAAa,EAAE,CAAC;QACnC,MAAM,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;QACxC,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;QAEpC,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAE3B,MAAM,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;QAEjD,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC;IACzB,CAAC;CACJ,CAAA;AA/BY,cAAc;IAD1B,IAAA,mBAAU,GAAE;GACA,cAAc,CA+B1B;AA/BY,wCAAc"}
|
package/package.json
CHANGED