rename files

This commit is contained in:
prafull-opensignlabs
2023-12-01 18:34:27 +05:30
parent 0576123a77
commit c44149050c
3 changed files with 6 additions and 6 deletions
@@ -4,11 +4,11 @@ import cors from 'cors';
export const app = express();
import dotenv from 'dotenv';
import getUser from './routes/getUser.js';
import getDocuments from './routes/getDocuments.js';
import getDocumentList from './routes/getDocumentList.js';
import getDocument from './routes/getDocument.js';
import getContact from './routes/getContact.js';
import deleteContact from './routes/deleteContact.js';
import getContacts from './routes/getContacts.js';
import getContactList from './routes/getContactList.js';
dotenv.config();
app.use(cors());
@@ -19,7 +19,7 @@ app.use(express.urlencoded({ limit: '50mb', extended: true }));
app.get('/getuser', getUser);
// get all types of documents on the basis of doctype
app.get('/getdocuments', getDocuments);
app.get('/documentlist', getDocumentList);
// get Document on the basis of id
app.get('/document/:document_id', getDocument);
@@ -31,4 +31,4 @@ app.get('/contact/:contact_id', getContact);
app.delete('/contact/:contact_id', deleteContact);
// get list of contacts
app.get('/getcontacts', getContacts);
app.get('/contactlist', getContactList);
@@ -1,4 +1,4 @@
export default async function getContacts(request, response) {
export default async function getContactList(request, response) {
try {
const reqToken = request.headers['x-api-token'];
if (!reqToken) {
@@ -3,7 +3,7 @@ import reportJson from '../../../parsefunction/reportsJson.js';
import dotenv from 'dotenv';
dotenv.config();
export default async function getDocuments(request, response) {
export default async function getDocumentList(request, response) {
const reqToken = request.headers['x-api-token'];
const appId = process.env.APP_ID;
const serverUrl = process.env.SERVER_URL;