diff options
Diffstat (limited to 'server/controllers')
-rw-r--r-- | server/controllers/api/accounts.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/controllers/api/accounts.ts b/server/controllers/api/accounts.ts index 00148ff55..05740318e 100644 --- a/server/controllers/api/accounts.ts +++ b/server/controllers/api/accounts.ts | |||
@@ -133,9 +133,9 @@ async function listAccountPlaylists (req: express.Request, res: express.Response | |||
133 | const serverActor = await getServerActor() | 133 | const serverActor = await getServerActor() |
134 | 134 | ||
135 | // Allow users to see their private/unlisted video playlists | 135 | // Allow users to see their private/unlisted video playlists |
136 | let privateAndUnlisted = false | 136 | let listMyPlaylists = false |
137 | if (res.locals.oauth && res.locals.oauth.token.User.Account.id === res.locals.account.id) { | 137 | if (res.locals.oauth && res.locals.oauth.token.User.Account.id === res.locals.account.id) { |
138 | privateAndUnlisted = true | 138 | listMyPlaylists = true |
139 | } | 139 | } |
140 | 140 | ||
141 | const resultList = await VideoPlaylistModel.listForApi({ | 141 | const resultList = await VideoPlaylistModel.listForApi({ |
@@ -145,7 +145,7 @@ async function listAccountPlaylists (req: express.Request, res: express.Response | |||
145 | count: req.query.count, | 145 | count: req.query.count, |
146 | sort: req.query.sort, | 146 | sort: req.query.sort, |
147 | accountId: res.locals.account.id, | 147 | accountId: res.locals.account.id, |
148 | privateAndUnlisted, | 148 | listMyPlaylists, |
149 | type: req.query.playlistType | 149 | type: req.query.playlistType |
150 | }) | 150 | }) |
151 | 151 | ||