website contact

This commit is contained in:
CHIEFSOFT\ameye
2025-12-27 11:39:24 -05:00
parent 989f3dc37e
commit e3bccc9bfe
3 changed files with 52 additions and 1 deletions
+15 -1
View File
@@ -13,7 +13,7 @@ from app.api.services import (
SubscriptionsService,
CommonDataService,
OfficeCustomerService,
GenerativesService, OfficeUsersService, OfficeTemplatesService, OfficeCountryService
GenerativesService, OfficeUsersService, OfficeTemplatesService, OfficeCountryService, WebsiteService
)
from app.api.services.comments import CommentsService
from app.models import Country
@@ -391,6 +391,20 @@ def test_check():
# response = ProductsService.process_request(data)
return {"status": "ok"}, 200
# ======================================================
@api.route('/website/contact', methods=['POST'])
def website_contact():
data = request.get_json()
# Save Website Contact Data
result = WebsiteService.save_web_contact_data(data)
# # Check if result is a tuple (error response)
# if isinstance(result, tuple):
# return jsonify(result[0]), result[1]
return jsonify(result)
# ======================================================
@api.route('/office/login', methods=['POST'])