瀏覽代碼

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

Kristian Vos 3 年之前
父節點
當前提交
1bdbbaa9af
共有 1 個文件被更改,包括 2 次插入0 次删除
  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 => {
 								stationModel.deleteOne({ _id: station._id }, err => {
 									if (err) return callback(err);
 									if (err) return callback(err);
 
 
+									CacheModule.runJob("HDEL", { table: "stations", key: station._id });
+
 									// if applicable, delete the corresponding playlist for the station
 									// if applicable, delete the corresponding playlist for the station
 									if (station.playlist)
 									if (station.playlist)
 										return PlaylistsModule.runJob("DELETE_PLAYLIST", {
 										return PlaylistsModule.runJob("DELETE_PLAYLIST", {