|
@@ -127,6 +127,10 @@ class _StationsModule extends CoreClass {
|
|
|
const stationModel = (this.stationModel = await DBModule.runJob("GET_MODEL", { modelName: "station" }));
|
|
|
const stationSchema = (this.stationSchema = await CacheModule.runJob("GET_SCHEMA", { schemaName: "station" }));
|
|
|
|
|
|
+ const stationHistoryModel = (this.stationHistoryModel = await DBModule.runJob("GET_MODEL", {
|
|
|
+ modelName: "stationHistory"
|
|
|
+ }));
|
|
|
+
|
|
|
return new Promise((resolve, reject) => {
|
|
|
async.waterfall(
|
|
|
[
|
|
@@ -987,9 +991,7 @@ class _StationsModule extends CoreClass {
|
|
|
|
|
|
const { stationId, currentSong, skipReason, skippedAt } = payload;
|
|
|
|
|
|
- const stationHistoryModel = await DBModule.runJob("GET_MODEL", { modelName: "stationHistory" });
|
|
|
-
|
|
|
- let document = await stationHistoryModel.create({
|
|
|
+ let document = await StationsModule.stationHistoryModel.create({
|
|
|
stationId,
|
|
|
type: "song_played",
|
|
|
payload: {
|