contact endpoint added

This commit was merged in pull request #17.
This commit is contained in:
victorAnumudu
2026-05-25 18:26:15 +01:00
parent edbcb5f0c9
commit 345eeaf971
2 changed files with 47 additions and 9 deletions
+11 -4
View File
@@ -26,11 +26,11 @@ const blogBasePath = () => {
}
const siteServerPath = () => {
// NEXT_PUBLIC_APP_MAIN_API="https://devapi.mermsemr.com"
return 'https://devapi.mermsemr.com';
return process.env.NEXT_PUBLIC_APP_MAIN_API;
}
const postAuxEnd = (path, postData, media = false) => {
const basePath = media ? 'https://blogdata.chiefsoft.net' : 'https://blogdata.chiefsoft.net'
const postAuxEnd = (basePath, path, postData) => {
// const basePath = media ? process.env.NEXT_PUBLIC_APP_MAIN_API : process.env.NEXT_PUBLIC_APP_MAIN_API;
let newPostData = {}
if (!media) {
newPostData = {...postData}
@@ -75,3 +75,10 @@ export const serMermsWebContact = (reqData) => {
}
return getAuxEnd(siteServerPath(), '/mermsblogdata/mermsemr', postData)
}
export const sendContactMsg = (reqData) => {
let postData = {
...reqData
}
return postAuxEnd(siteServerPath(), '/website/contact', postData)
}