master
Bhaskara Kishore 2 years ago
parent 31e6ec9c34
commit 3f7f36d566

@ -49,7 +49,7 @@
<!-- Do not commit this file into the server , ignore it by adding it to .gitignore -->
<!----------------**************************--------------------->
<rapi-doc
spec-url="http://35.207.198.4:3000/documentation/json"
spec-url="http://localhost:5000/documentation/json"
show-header = 'false'
allow-authentication ="true"
>

@ -14,8 +14,8 @@ exports.options = {
},
// We have to change this beacause this is running on local
// we have to run on this on swagger
//host: "localhost:3000", //Devlopemnt host on lcoal
host: "35.207.198.4:3000", //Production for swagger
host: "localhost:5000", //Devlopemnt host on lcoal
//host: "35.207.198.4:3000", //Production for swagger
schemes: ["http"],
consumes: ["application/json"],
produces: ["application/json"],

@ -1019,9 +1019,7 @@ exports.getPendingSuppliers = async (req, reply) => {
);
console.log(supplierIdsToInclude, "SUPLIERINCLUDE");
const timestamps = friendRequests.map(request =>
moment(request.timestamp, "DD-MM-YYYYTHH:mm:ss.SSSZ").format("DD-MM-YYYY hh:mm:ss")
);
const timestamps = friendRequests.map(request => request.timestamp);
console.log(timestamps, "timestamps");
await Supplier.find({ supplierId: { $in: supplierIdsToInclude } })
.limit(limit)
@ -1096,9 +1094,12 @@ exports.getPendingCustomers = async (req, reply) => {
const supplierIdsToInclude = friendRequests.map(
(request) => request.customerId
);
const timestamps = friendRequests.map(request =>
moment(request.timestamp, "DD-MM-YYYYTHH:mm:ss.SSSZ").format("DD-MM-YYYY hh:mm:ss")
);
// const timestamps = friendRequests.map(request =>
// moment(request.timestamp, "DD-MM-YYYYTHH:mm:ss.SSSZ").format("DD-MM-YYYY hh:mm:ss")
// );
const timestamps = friendRequests.map(request => request.timestamp);
console.log(timestamps, "timestamps");
await User.find({ customerId: { $in: supplierIdsToInclude } })
.limit(limit)
.skip(startindex)

@ -361,7 +361,7 @@ const start = async () => {
try {
await fastify.listen(3000, "0.0.0.0");
await fastify.listen(5000, "0.0.0.0");
fastify.log.info(`listening on ${fastify.server.address().port}`);
fastify.log.info(`server listening on ${fastify.config}`);
} catch (err) {

Loading…
Cancel
Save