Skip to content

Commit 8af49c1

Browse files
committed
added the schema for the timestamps and corrected typo
1 parent e2f3382 commit 8af49c1

File tree

2 files changed

+36
-2
lines changed

2 files changed

+36
-2
lines changed

api/src/httpd/router.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,8 @@ export const registerRoutes = (
282282
);
283283

284284
server.get(
285-
`${urlPrefix}/timestaps`,
286-
silentRouteSettings(getSchema(server, "version")),
285+
`${urlPrefix}/timestamps`,
286+
silentRouteSettings(getSchema(server, "timestamps")),
287287
(request, reply) => {
288288
getTimestamps(
289289
multichainClient,

api/src/httpd/schema.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,40 @@ const schemas: Schemas = {
143143
},
144144
},
145145

146+
timestamps :{
147+
schema: {
148+
description: "Returns the latest 10 timestamps",
149+
tags: ["system"],
150+
summary: "Get timestamps",
151+
security: [
152+
{
153+
bearerToken: [],
154+
},
155+
],
156+
response: {
157+
200: {
158+
description: "successful response",
159+
type: "object",
160+
properties: {
161+
apiVersion: { type: "string", example: "1.0" },
162+
data: {
163+
type: "object",
164+
properties: {
165+
timestamps: {
166+
type: "array",
167+
items: {
168+
type: "number",
169+
example: 1613000000,
170+
},
171+
},
172+
},
173+
},
174+
},
175+
},
176+
},
177+
}
178+
},
179+
146180
registerNode: {
147181
schema: {
148182
description: "Used by non-alpha MultiChain nodes to register their wallet address.",

0 commit comments

Comments
 (0)