• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

cameri / nostream / 27147647689

08 Jun 2026 03:16PM UTC coverage: 67.223% (+0.2%) from 66.977%
27147647689

Pull #641

github

web-flow
Merge 4f7095a1a into 1295272c3
Pull Request #641: feat: add admin backend foundation (login, session, health)

1953 of 3265 branches covered (59.82%)

Branch coverage included in aggregate %.

139 of 168 new or added lines in 14 files covered. (82.74%)

4489 of 6318 relevant lines covered (71.05%)

20.36 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

62.5
/src/controllers/admin/get-session-controller.ts
1
import { Request, Response } from 'express'
2

3
import { IAdminAuthProvider } from '../../@types/admin'
4
import { IController } from '../../@types/controllers'
5

6
export class GetAdminSessionController implements IController {
2✔
7
  public constructor(private readonly authProvider: IAdminAuthProvider) {}
2✔
8

9
  public async handleRequest(request: Request, response: Response): Promise<void> {
10
    if (!this.authProvider.isRequestAuthenticated(request)) {
2!
NEW
11
      response.status(401).setHeader('content-type', 'application/json').send(JSON.stringify({ error: 'Unauthorized' }))
×
NEW
12
      return
×
13
    }
14

15
    response.status(200).setHeader('content-type', 'application/json').send(
2✔
16
      JSON.stringify({
17
        authenticated: true,
18
        expiresAt: this.authProvider.getSessionExpiresAt(request),
19
      }),
20
    )
21
  }
22
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc