add custom template flow
This commit is contained in:
@@ -432,6 +432,15 @@ def get_set_template_office():
|
||||
response = OfficeTemplatesService.set_office_user_template(data)
|
||||
return response
|
||||
|
||||
|
||||
@api.route('/office/template/custom-add', methods=['POST'])
|
||||
# @token_required
|
||||
def get_create_custom_template_office():
|
||||
data = request.get_json()
|
||||
|
||||
response = OfficeTemplatesService.create_custom_template(data)
|
||||
return response
|
||||
|
||||
@api.route('/office/billings', methods=['GET'])
|
||||
# @token_required
|
||||
def get_subscription_billings_office():
|
||||
|
||||
@@ -71,3 +71,36 @@ class OfficeTemplatesService(BaseService):
|
||||
"error": f"An error occurred: {str(e)}",
|
||||
}
|
||||
return office_users_result
|
||||
|
||||
|
||||
|
||||
@staticmethod
|
||||
def create_custom_template(data):
|
||||
logger.info('create_custom_template')
|
||||
try:
|
||||
# office_users = OfficeUsers.get_office_users_list()
|
||||
# office_users_data = []
|
||||
# if office_users:
|
||||
# for t in office_users:
|
||||
# office_users_data.append({
|
||||
# 'id': t.id,
|
||||
# 'uid': t.uid,
|
||||
# 'username': t.username,
|
||||
# 'firstname': t.firstname,
|
||||
# 'lastname': t.lastname,
|
||||
# 'acc_level': t.acc_level,
|
||||
# 'status': t.status,
|
||||
# 'added': t.added.isoformat() if t.added else None
|
||||
# })
|
||||
|
||||
office_users_result = {
|
||||
"set_office_user_template": [],
|
||||
}
|
||||
return office_users_result
|
||||
|
||||
except Exception as e:
|
||||
logger.error(f"An error occurred: {str(e)}", exc_info=True)
|
||||
office_users_result = {
|
||||
"error": f"An error occurred: {str(e)}",
|
||||
}
|
||||
return office_users_result
|
||||
|
||||
Reference in New Issue
Block a user