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

cameri / nostream / 27155485231

08 Jun 2026 05:33PM UTC coverage: 67.23% (+0.3%) from 66.977%
27155485231

Pull #641

github

web-flow
Merge 0c2a1a8d7 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 %.

141 of 170 new or added lines in 14 files covered. (82.94%)

4491 of 6320 relevant lines covered (71.06%)

23.73 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