feat: dashbaord services api
feat: clinic setup api
This commit is contained in:
@@ -1,14 +1,11 @@
|
||||
from asyncio.log import logger
|
||||
from typing import List
|
||||
from fastapi import APIRouter, Depends, HTTPException, status
|
||||
from sqlalchemy.orm import Session
|
||||
from fastapi import APIRouter, HTTPException, status
|
||||
|
||||
# database
|
||||
from database import get_db
|
||||
|
||||
# schemas
|
||||
from schemas.ResponseSchemas import Clinic, ClinicWithDoctors
|
||||
from schemas.CreateSchemas import ClinicCreate
|
||||
from schemas.ResponseSchemas import Clinic
|
||||
from schemas.UpdateSchemas import ClinicUpdate
|
||||
from models.Clinics import Clinics
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
from fastapi import APIRouter, Request
|
||||
from services.dashboardService import DashboardService
|
||||
from schemas.ApiResponse import ApiResponse
|
||||
from enums.enums import UserType
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
@router.get("/")
|
||||
async def get_clinic_doctor_status_count(req:Request):
|
||||
counts = DashboardService().get_dashboard_counts(isSuperAdmin=req.state.user["userType"] == UserType.SUPER_ADMIN)
|
||||
return ApiResponse(data=counts, message="Counts fetched successfully")
|
||||
Reference in New Issue
Block a user