]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
(well-known url) add change-password
authorRigel Kent <sendmemail@rigelk.eu>
Fri, 7 Dec 2018 00:42:00 +0000 (01:42 +0100)
committerChocobozzz <me@florianbigard.com>
Fri, 7 Dec 2018 12:56:08 +0000 (13:56 +0100)
server/controllers/static.ts
server/tests/misc-endpoints.ts

index 55e7392a1a1af040f667d170c8f1ee8030f31bf9..4fd58f70c008b11704042f558fce4d42eaf3354a 100644 (file)
@@ -136,6 +136,12 @@ staticRouter.use('/.well-known/dnt/',
   }
 )
 
+staticRouter.use('/.well-known/change-password',
+  (_, res: express.Response) => {
+    res.redirect('/my-account/settings')
+  }
+)
+
 // ---------------------------------------------------------------------------
 
 export {
index b53803ee1d64e235f036faf97aa8cdf0be4ba0c0..4de47d693069acbad25c2a8e6312554eb9350996 100644 (file)
@@ -72,6 +72,16 @@ describe('Test misc endpoints', function () {
 
       expect(res.body.tracking).to.equal('N')
     })
+
+    it('Should get change-password location', async function () {
+      const res = await makeGetRequest({
+        url: server.url,
+        path: '/.well-known/change-password',
+        statusCodeExpected: 302
+      })
+
+      expect(res.header.location).to.equal('/my-account/settings')
+    })
   })
 
   describe('Test classic static endpoints', function () {