jp.db.schemas 2.0.31 → 2.0.32

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.
@@ -3,6 +3,6 @@ import { Rating, RatingDocument } from '..';
3
3
  export declare class RatingRepository {
4
4
  private ratingModel;
5
5
  constructor(ratingModel: Model<RatingDocument>);
6
- findRating(userName: string): Promise<Array<Rating> | null>;
6
+ findRating(channel: string, game: string): Promise<Array<Rating> | null>;
7
7
  }
8
8
  //# sourceMappingURL=rating.repository.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rating.repository.d.ts","sourceRoot":"","sources":["../../src/repositories/rating.repository.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,IAAI,CAAC;AAG5C,qBACa,gBAAgB;IACc,OAAO,CAAC,WAAW;gBAAX,WAAW,EAAE,KAAK,CAAC,cAAc,CAAC;IAG3E,UAAU,CAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;CAKrE"}
1
+ {"version":3,"file":"rating.repository.d.ts","sourceRoot":"","sources":["../../src/repositories/rating.repository.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,IAAI,CAAC;AAG5C,qBACa,gBAAgB;IACc,OAAO,CAAC,WAAW;gBAAX,WAAW,EAAE,KAAK,CAAC,cAAc,CAAC;IAG3E,UAAU,CAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;CAQlF"}
@@ -17,13 +17,16 @@ const common_1 = require("@nestjs/common");
17
17
  const mongoose_1 = require("@nestjs/mongoose");
18
18
  const mongoose_2 = require("mongoose");
19
19
  const __1 = require("..");
20
+ const utils_1 = require("../utils");
20
21
  let RatingRepository = class RatingRepository {
21
22
  constructor(ratingModel) {
22
23
  this.ratingModel = ratingModel;
23
24
  }
24
- async findRating(userName) {
25
+ async findRating(channel, game) {
25
26
  return this.ratingModel
26
- .find({ userName })
27
+ .find({
28
+ channels: (0, utils_1.getChannelRegExpFilter)(channel),
29
+ })
27
30
  .exec();
28
31
  }
29
32
  };
@@ -1 +1 @@
1
- {"version":3,"file":"rating.repository.js","sourceRoot":"","sources":["../../src/repositories/rating.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,+CAA+C;AAC/C,uCAAiC;AAEjC,0BAA4C;AAIrC,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IACzB,YAA+C,WAAkC;QAAlC,gBAAW,GAAX,WAAW,CAAuB;IACjF,CAAC;IAED,KAAK,CAAC,UAAU,CAAE,QAAgB;QAC9B,OAAO,IAAI,CAAC,WAAW;aAClB,IAAI,CAAC,EAAC,QAAQ,EAAC,CAAC;aAChB,IAAI,EAAE,CAAC;IAChB,CAAC;CACJ,CAAA;AATY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;IAEK,WAAA,IAAA,sBAAW,EAAC,UAAM,CAAC,IAAI,CAAC,CAAA;qCAAsB,gBAAK;GADxD,gBAAgB,CAS5B"}
1
+ {"version":3,"file":"rating.repository.js","sourceRoot":"","sources":["../../src/repositories/rating.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,+CAA+C;AAC/C,uCAAiC;AAEjC,0BAA4C;AAC5C,oCAAkD;AAG3C,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IACzB,YAA+C,WAAkC;QAAlC,gBAAW,GAAX,WAAW,CAAuB;IACjF,CAAC;IAED,KAAK,CAAC,UAAU,CAAE,OAAe,EAAE,IAAY;QAC3C,OAAO,IAAI,CAAC,WAAW;aAClB,IAAI,CAAC;YACF,QAAQ,EAAE,IAAA,8BAAsB,EAAC,OAAO,CAAC;SAE5C,CAAC;aACD,IAAI,EAAE,CAAC;IAChB,CAAC;CACJ,CAAA;AAZY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;IAEK,WAAA,IAAA,sBAAW,EAAC,UAAM,CAAC,IAAI,CAAC,CAAA;qCAAsB,gBAAK;GADxD,gBAAgB,CAY5B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jp.db.schemas",
3
- "version": "2.0.31",
3
+ "version": "2.0.32",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -10,9 +10,12 @@ export class RatingRepository {
10
10
  constructor (@InjectModel(Rating.name) private ratingModel: Model<RatingDocument>) {
11
11
  }
12
12
 
13
- async findRating (userName: string): Promise<Array<Rating> | null> {
13
+ async findRating (channel: string, game: string): Promise<Array<Rating> | null> {
14
14
  return this.ratingModel
15
- .find({userName})
15
+ .find({
16
+ channels: getChannelRegExpFilter(channel),
17
+
18
+ })
16
19
  .exec();
17
20
  }
18
21
  }