-
-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Daniel Kopp
committed
Nov 10, 2022
1 parent
7623239
commit a0a1cd7
Showing
5 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import type { Server } from 'http' | ||
import type { RawReplyDefaultExpression, RawRequestDefaultExpression, RouteOptions } from 'fastify' | ||
import { type Params, type Querystring } from './schema' | ||
import { statusRouteSchema } from './status-schema' | ||
|
||
export const getStatus: RouteOptions< | ||
Server, | ||
RawRequestDefaultExpression, | ||
RawReplyDefaultExpression, | ||
{ | ||
Querystring: Querystring | ||
Params: Params | ||
} | ||
> = { | ||
method: 'GET', | ||
url: '/artifacts/status', | ||
schema: statusRouteSchema, | ||
async handler(req, reply) { | ||
reply.send({ status: 'enabled' }) | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { Static, Type } from '@sinclair/typebox' | ||
|
||
const querystring = Type.Object({}, { additionalParameters: false }) | ||
export type Querystring = Static<typeof querystring> | ||
|
||
const params = Type.Object({}, { additionalParameters: false }) | ||
export type Params = Static<typeof params> | ||
|
||
export const statusRouteSchema = { | ||
querystring, | ||
params, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters