Feat: Multiplayer sessions added using CRUD database.
This commit is contained in:
32
business_objects/api.py
Normal file
32
business_objects/api.py
Normal file
@@ -0,0 +1,32 @@
|
||||
"""
|
||||
Project: PARTS Website
|
||||
Author: Edward Middleton-Smith
|
||||
Precision And Research Technology Systems Limited
|
||||
|
||||
Technology: Business Objects
|
||||
Feature: Base Business Object
|
||||
|
||||
Description:
|
||||
Abstract business object
|
||||
"""
|
||||
|
||||
# internal
|
||||
from extensions import db
|
||||
import lib.argument_validation as av
|
||||
# external
|
||||
from typing import ClassVar
|
||||
from flask import jsonify
|
||||
|
||||
|
||||
class API():
|
||||
|
||||
@staticmethod
|
||||
def get_standard_response(success: bool, status_code: int, message: str, data: any, errors: list, meta: dict):
|
||||
return jsonify({
|
||||
"success": success,
|
||||
"status_code": status_code,
|
||||
"message": message,
|
||||
"data": data,
|
||||
"errors": errors,
|
||||
"meta": meta
|
||||
})
|
||||
Reference in New Issue
Block a user