chore(api): clean up index file
This commit is contained in:
14
apps/api/src/hooks/timestamp.hook.ts
Normal file
14
apps/api/src/hooks/timestamp.hook.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import type {
|
||||
FastifyReply,
|
||||
FastifyRequest,
|
||||
HookHandlerDoneFunction,
|
||||
} from 'fastify';
|
||||
|
||||
export function timestampHook(
|
||||
request: FastifyRequest,
|
||||
reply: FastifyReply,
|
||||
done: HookHandlerDoneFunction,
|
||||
) {
|
||||
request.timestamp = Date.now();
|
||||
done();
|
||||
}
|
||||
Reference in New Issue
Block a user