Spaces:
Running
Running
chore:changed code structure
Browse files
src/notifications/router.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
from src.notifications.schemas import RegisterDeviceRequest
|
| 2 |
from src.notifications.service import register_device
|
| 3 |
from fastapi import APIRouter, Depends
|
|
@@ -16,3 +17,5 @@ async def register_device_route(
|
|
| 16 |
):
|
| 17 |
device = await register_device(user, body, session)
|
| 18 |
return {"message": "Device registered", "device": str(device.id)}
|
|
|
|
|
|
|
|
|
| 1 |
+
from requests.api import delete
|
| 2 |
from src.notifications.schemas import RegisterDeviceRequest
|
| 3 |
from src.notifications.service import register_device
|
| 4 |
from fastapi import APIRouter, Depends
|
|
|
|
| 17 |
):
|
| 18 |
device = await register_device(user, body, session)
|
| 19 |
return {"message": "Device registered", "device": str(device.id)}
|
| 20 |
+
|
| 21 |
+
|