Skip to content

Commit 2fad89a

Browse files
[Penify]: Documentation for commit - fdcc926
1 parent 531e5ee commit 2fad89a

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

next-app/app/api/risk/scores/route.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
export const runtime = 'nodejs';
2+
/**
3+
* Handles the GET request and returns a mock time-series risk per layer.
4+
*/
25
export async function GET() {
36
// Mock time-series risk per layer: core/operational/context
47
const now = Date.now();
@@ -8,4 +11,7 @@ export async function GET() {
811
}));
912
return Response.json({ series });
1013
}
14+
/**
15+
* Clamps a value between a minimum and maximum range.
16+
*/
1117
function clamp(min:number,max:number,v:number){return Math.max(min,Math.min(max,v));}

0 commit comments

Comments
 (0)