From c60b83f0dd6febc7842612acf16fe1bc1d523987 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 10 Dec 2017 17:50:02 +0900 Subject: Refactor --- src/api/server.ts | 7 ------- 1 file changed, 7 deletions(-) (limited to 'src/api/server.ts') diff --git a/src/api/server.ts b/src/api/server.ts index 026357b465..463b3f0176 100644 --- a/src/api/server.ts +++ b/src/api/server.ts @@ -49,13 +49,6 @@ endpoints.forEach(endpoint => app.post('/signup', require('./private/signup').default); app.post('/signin', require('./private/signin').default); -app.use((req, res, next) => { - // req.headers['cookie'] は常に string ですが、型定義の都合上 - // string | string[] になっているので string を明示しています - res.locals.user = ((req.headers['cookie'] as string || '').match(/i=(!\w+)/) || [null, null])[1]; - next(); -}); - require('./service/github')(app); require('./service/twitter')(app); -- cgit v1.2.3-freya