Skip to content
Snippets Groups Projects
Commit 6f40b2db authored by Paolo.Brasolin's avatar Paolo.Brasolin
Browse files

feat: mock /GetImage

parent b19d839e
No related branches found
No related tags found
No related merge requests found
...@@ -14,6 +14,38 @@ server.get("/", function (request, reply) { ...@@ -14,6 +14,38 @@ server.get("/", function (request, reply) {
reply.code(200).send("Hello, World!"); reply.code(200).send("Hello, World!");
}); });
server.route({
method: "POST",
url: "/GetImage",
schema: {
body: {
type: "object",
properties: {
sessionImages: {
type: "array",
items: { type: "number" },
},
},
},
response: {
200: {
type: "object",
properties: {
id: { type: "number" },
image: { type: "string" },
},
},
},
},
handler: function (request, reply) {
reply.send({
id: 0,
image:
"iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAA3SURBVBhXYyAXeHh43AeDhIQEqBAEAIX+g8H379+hQhAAlwACqBAEVFRUQESnT58OFSIRMDAAABZDJ2qjC6hLAAAAAElFTkSuQmCC",
});
},
});
server.listen(process.env.PORT as string, "0.0.0.0", function (err, address) { server.listen(process.env.PORT as string, "0.0.0.0", function (err, address) {
if (err) { if (err) {
server.log.error(err); server.log.error(err);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment