|
|
@ -1024,16 +1024,16 @@ exports.getPendingSuppliers = async (req, reply) => {
|
|
|
|
.skip(startindex)
|
|
|
|
.skip(startindex)
|
|
|
|
.exec()
|
|
|
|
.exec()
|
|
|
|
.then((docs) => {
|
|
|
|
.then((docs) => {
|
|
|
|
const supplierDataWithTimestamp = docs.map((doc, index) => ({
|
|
|
|
// const supplierDataWithTimestamp = docs.map((doc, index) => ({
|
|
|
|
data: doc,
|
|
|
|
// data: doc,
|
|
|
|
//timestamp: timestamps[index],
|
|
|
|
// //timestamp: timestamps[index],
|
|
|
|
}));
|
|
|
|
// }));
|
|
|
|
reply.send({
|
|
|
|
// reply.send({
|
|
|
|
status_code: 200,
|
|
|
|
// status_code: 200,
|
|
|
|
data: supplierDataWithTimestamp,
|
|
|
|
// data: supplierDataWithTimestamp,
|
|
|
|
count: docs.length,
|
|
|
|
// count: docs.length,
|
|
|
|
});
|
|
|
|
// });
|
|
|
|
//reply.send({ status_code: 200, data: docs, count: docs.length ,timestamps});
|
|
|
|
reply.send({ status_code: 200, data: docs, count: docs.length });
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.catch((err) => {
|
|
|
|
.catch((err) => {
|
|
|
|
console.log(err);
|
|
|
|
console.log(err);
|
|
|
@ -1099,16 +1099,16 @@ exports.getPendingCustomers = async (req, reply) => {
|
|
|
|
.skip(startindex)
|
|
|
|
.skip(startindex)
|
|
|
|
.exec()
|
|
|
|
.exec()
|
|
|
|
.then((docs) => {
|
|
|
|
.then((docs) => {
|
|
|
|
const customerDataWithTimestamp = docs.map((doc, index) => ({
|
|
|
|
// const customerDataWithTimestamp = docs.map((doc, index) => ({
|
|
|
|
data: doc,
|
|
|
|
// data: doc,
|
|
|
|
//timestamp: timestamps[index],
|
|
|
|
// //timestamp: timestamps[index],
|
|
|
|
}));
|
|
|
|
// }));
|
|
|
|
//reply.send({ status_code: 200, data: docs, count: docs.length ,timestamps});
|
|
|
|
reply.send({ status_code: 200, data: docs, count: docs.length });
|
|
|
|
reply.send({
|
|
|
|
// reply.send({
|
|
|
|
status_code: 200,
|
|
|
|
// status_code: 200,
|
|
|
|
data: customerDataWithTimestamp,
|
|
|
|
// data: customerDataWithTimestamp,
|
|
|
|
count: docs.length,
|
|
|
|
// count: docs.length,
|
|
|
|
});
|
|
|
|
// });
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.catch((err) => {
|
|
|
|
.catch((err) => {
|
|
|
|
console.log(err);
|
|
|
|
console.log(err);
|
|
|
|