From 64cc5e8575fda47b281ae20abf0020e27fc8ce7c Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Fri, 5 Oct 2018 15:17:34 +0200 Subject: add webtorrent opt-out settings - add a key in localstorage to remember the opt-out - add a user setting --- server/controllers/api/users/me.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'server/controllers') diff --git a/server/controllers/api/users/me.ts b/server/controllers/api/users/me.ts index 591ec6b25..f78294f17 100644 --- a/server/controllers/api/users/me.ts +++ b/server/controllers/api/users/me.ts @@ -327,6 +327,7 @@ async function updateMe (req: express.Request, res: express.Response, next: expr if (body.password !== undefined) user.password = body.password if (body.email !== undefined) user.email = body.email if (body.nsfwPolicy !== undefined) user.nsfwPolicy = body.nsfwPolicy + if (body.webTorrentPolicy !== undefined) user.webTorrentPolicy = body.webTorrentPolicy if (body.autoPlayVideo !== undefined) user.autoPlayVideo = body.autoPlayVideo await sequelizeTypescript.transaction(async t => { -- cgit v1.2.3 From ed638e5325096ef580da20f370ac61c59cd48cf7 Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Fri, 12 Oct 2018 18:12:39 +0200 Subject: move to boolean switch --- server/controllers/api/users/me.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server/controllers') diff --git a/server/controllers/api/users/me.ts b/server/controllers/api/users/me.ts index f78294f17..3c511dc70 100644 --- a/server/controllers/api/users/me.ts +++ b/server/controllers/api/users/me.ts @@ -327,7 +327,7 @@ async function updateMe (req: express.Request, res: express.Response, next: expr if (body.password !== undefined) user.password = body.password if (body.email !== undefined) user.email = body.email if (body.nsfwPolicy !== undefined) user.nsfwPolicy = body.nsfwPolicy - if (body.webTorrentPolicy !== undefined) user.webTorrentPolicy = body.webTorrentPolicy + if (body.webTorrentEnabled !== undefined) user.webTorrentEnabled = body.webTorrentEnabled if (body.autoPlayVideo !== undefined) user.autoPlayVideo = body.autoPlayVideo await sequelizeTypescript.transaction(async t => { -- cgit v1.2.3