Skip to content

Commit

Permalink
fix: test login endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
SIY1121 committed Mar 23, 2021
1 parent dca28ee commit faba59b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,18 @@ export function startApiServer() {
maxAge: 1000 * 60 * 60 * 24 * 7,
})
res.send(
'<p>Logged in as sample user</p><a href="./api-docs">to api-docs</a>'
`<p>Logged in as sample user</p>
<p><a href="./api-docs/">api-docs</a></p>
<p><a href="./logout">logout</a></p>
`
)
})
app.get('/logout', (req, res) => {
res.clearCookie('connect.sid')
res.send('<p>Logged out</p><a href="./api-docs">to api-docs</a>')
res.send(`<p>Logged out</p>
<p><a href="./api-docs/">api-docs</a></p>
<p><a href="./login">login</a></p>
`)
})

app.use(
Expand Down

0 comments on commit faba59b

Please sign in to comment.