Browse Source

fix: user account removal didn't remove deleted stations from the cache

Kristian Vos 3 years ago
parent
commit
1bdbbaa9af
1 changed files with 2 additions and 0 deletions
  1. 2 0
      backend/logic/actions/users.js

+ 2 - 0
backend/logic/actions/users.js

@@ -244,6 +244,8 @@ export default {
 								stationModel.deleteOne({ _id: station._id }, err => {
 									if (err) return callback(err);
 
+									CacheModule.runJob("HDEL", { table: "stations", key: station._id });
+
 									// if applicable, delete the corresponding playlist for the station
 									if (station.playlist)
 										return PlaylistsModule.runJob("DELETE_PLAYLIST", {