Commit 8f017c7c authored by Arun Uday's avatar Arun Uday

changes to api calls

parent 1df069bc
...@@ -18,4 +18,3 @@ class ApiEndPoints: ...@@ -18,4 +18,3 @@ class ApiEndPoints:
asset_manager_user_add: str = asset_manager_user_registration + create asset_manager_user_add: str = asset_manager_user_registration + create
asset_manager_user_update: str = asset_manager_user_registration + update asset_manager_user_update: str = asset_manager_user_registration + update
asset_manager_user_delete: str = asset_manager_user_registration + delete asset_manager_user_delete: str = asset_manager_user_registration + delete
...@@ -964,3 +964,4 @@ ImportError: cannot import name 'Services' from 'scripts.constants' (E:\Git\meta ...@@ -964,3 +964,4 @@ ImportError: cannot import name 'Services' from 'scripts.constants' (E:\Git\meta
2023-03-23 19:09:51 - INFO - [MainThread:<module>(): 37] - App Starting at 127.0.0.1:8671 2023-03-23 19:09:51 - INFO - [MainThread:<module>(): 37] - App Starting at 127.0.0.1:8671
2023-03-23 19:33:49 - INFO - [MainThread:<module>(): 37] - App Starting at 127.0.0.1:8671 2023-03-23 19:33:49 - INFO - [MainThread:<module>(): 37] - App Starting at 127.0.0.1:8671
2023-03-23 19:34:12 - INFO - [MainThread:<module>(): 37] - App Starting at 127.0.0.1:8671 2023-03-23 19:34:12 - INFO - [MainThread:<module>(): 37] - App Starting at 127.0.0.1:8671
2023-03-23 22:40:22 - INFO - [MainThread:<module>(): 37] - App Starting at 127.0.0.1:8671
\ No newline at end of file
...@@ -5,14 +5,11 @@ from pydantic import BaseModel ...@@ -5,14 +5,11 @@ from pydantic import BaseModel
# model for login request # model for login request
class LoginRequest(BaseModel): class LoginRequest(BaseModel):
username: Union[str, None] = None username: str
password: Union[str, None] = None password: str
class RegistrationData: class RegistrationData:
name: Union[str, None] = None name: str
email: Union[str: None] = None email: str
password: Union[str: None] = None user_role: str
user_role: Union[str: None] = None
is_alive: Union[bool: None] = None
created_at: Union[str: None] = None
...@@ -3,6 +3,6 @@ from scripts.constants.api import ApiEndPoints ...@@ -3,6 +3,6 @@ from scripts.constants.api import ApiEndPoints
from scripts.services.v1 import iot_manager_services from scripts.services.v1 import iot_manager_services
# creating the api router with version as the prefix # creating the api router with version as the prefix
router = APIRouter(prefix=ApiEndPoints.asset_manager_login) router = APIRouter()
# routing to the service api # routing to the service api
router.include_router(iot_manager_services.router) router.include_router(iot_manager_services.router)
...@@ -12,7 +12,7 @@ router = APIRouter(prefix=ApiEndPoints.version) ...@@ -12,7 +12,7 @@ router = APIRouter(prefix=ApiEndPoints.version)
obj_login_handler = LoginHandlers() obj_login_handler = LoginHandlers()
@router.post(ApiEndPoints.asset_manager_login) @router.post(ApiEndPoints.asset_manager_submit)
async def login_default( async def login_default(
login_type: str, login_type: str,
user_data: LoginRequest, user_data: LoginRequest,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment