You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
1.4 KiB
64 lines
1.4 KiB
1 year ago
|
const fastify = require("fastify");
|
||
|
const storeController = require('../controllers/storeController')
|
||
|
|
||
|
|
||
|
module.exports = function (fastify, opts, next) {
|
||
|
fastify.route({
|
||
|
method: "POST",
|
||
|
url: "/api/storeSignup",
|
||
|
schema: {
|
||
|
tags: ["Store"],
|
||
|
description: "This is for cretae New Store Account",
|
||
|
summary: "This is for cretae New Store Account",
|
||
|
body: {
|
||
|
type: "object",
|
||
|
properties: {
|
||
|
name:{ type: "string"},
|
||
|
phone1: { type: "string"},
|
||
|
phone2: { type: "string"},
|
||
|
city: { type: "string"},
|
||
|
location: { type: "string"},
|
||
|
picture: { type: "string"},
|
||
|
team: { type: "string"},
|
||
|
manager: { type: "string"},
|
||
|
|
||
|
email: { type: "string" },
|
||
|
password: { type: "string" },
|
||
|
|
||
|
},
|
||
|
},
|
||
|
security: [
|
||
|
{
|
||
|
basicAuth: [],
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
|
||
|
handler: storeController.storeSignUp,
|
||
|
|
||
|
});
|
||
|
|
||
|
fastify.post("/api/storeLogin", {
|
||
|
schema: {
|
||
|
description: "This is for Login Store",
|
||
|
tags: ["Store"],
|
||
|
summary: "This is for Login Store",
|
||
|
body: {
|
||
|
type: "object",
|
||
|
required: ["phone1", "password"],
|
||
|
properties: {
|
||
|
phone1: { type: "string" },
|
||
|
password: { type: "string" },
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
handler: storeController.storeLogin,
|
||
|
});
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
next();
|
||
|
};
|