jp.db.schemas 1.0.37 → 1.0.38
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 { RoomDocument } from '../';
|
|
|
3
3
|
export declare class RoomsRepository {
|
|
4
4
|
private roomModel;
|
|
5
5
|
constructor(roomModel: Model<RoomDocument>);
|
|
6
|
-
findRooms(): Promise<Array<RoomDocument>>;
|
|
6
|
+
findRooms(game: string): Promise<Array<RoomDocument>>;
|
|
7
7
|
}
|
|
8
8
|
//# sourceMappingURL=rooms.repository.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rooms.repository.d.ts","sourceRoot":"","sources":["../../src/repositories/rooms.repository.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,OAAO,EAAQ,YAAY,EAAE,MAAM,KAAK,CAAC;AAEzC,qBACa,eAAe;
|
|
1
|
+
{"version":3,"file":"rooms.repository.d.ts","sourceRoot":"","sources":["../../src/repositories/rooms.repository.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,OAAO,EAAQ,YAAY,EAAE,MAAM,KAAK,CAAC;AAEzC,qBACa,eAAe;IACa,OAAO,CAAC,SAAS;gBAAT,SAAS,EAAE,KAAK,CAAC,YAAY,CAAC;IAGrE,SAAS,CAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;CAK/D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rooms.repository.js","sourceRoot":"","sources":["../../src/repositories/rooms.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,+CAA+C;AAC/C,uCAAiC;AAEjC,2BAAyC;AAGlC,IAAM,eAAe,GAArB,MAAM,eAAe;
|
|
1
|
+
{"version":3,"file":"rooms.repository.js","sourceRoot":"","sources":["../../src/repositories/rooms.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,+CAA+C;AAC/C,uCAAiC;AAEjC,2BAAyC;AAGlC,IAAM,eAAe,GAArB,MAAM,eAAe;IACxB,YAA6C,SAA8B;QAA9B,cAAS,GAAT,SAAS,CAAqB;IAC3E,CAAC;IAED,KAAK,CAAC,SAAS,CAAE,IAAY;QACzB,OAAO,IAAI,CAAC,SAAS;aAChB,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC;aACd,IAAI,EAAE,CAAC;IAChB,CAAC;CACJ,CAAA;AATY,0CAAe;0BAAf,eAAe;IAD3B,IAAA,mBAAU,GAAE;IAEK,WAAA,IAAA,sBAAW,EAAC,QAAI,CAAC,IAAI,CAAC,CAAA;qCAAoB,gBAAK;GADpD,eAAe,CAS3B"}
|
package/package.json
CHANGED
|
@@ -6,12 +6,12 @@ import { Room, RoomDocument } from '../';
|
|
|
6
6
|
|
|
7
7
|
@Injectable()
|
|
8
8
|
export class RoomsRepository {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
constructor (@InjectModel(Room.name) private roomModel: Model<RoomDocument>) {
|
|
10
|
+
}
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
async findRooms (game: string): Promise<Array<RoomDocument>> {
|
|
13
|
+
return this.roomModel
|
|
14
|
+
.find({ game })
|
|
15
|
+
.exec();
|
|
16
|
+
}
|
|
17
17
|
}
|