encryptare + adaugare de imagini
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
from fastapi import APIRouter, Header, HTTPException
|
||||
from .get_private_key import get_private_key
|
||||
|
||||
'''
|
||||
The 'messages' packages contains the router configuration for the 'Messages' endpoints.
|
||||
'''
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
@router.get("/get_private_key")
|
||||
async def get_private_key_router(authorization_key: str = Header('Authorization_Key', convert_underscores=False)):
|
||||
expected_value = 'messenger'
|
||||
if not authorization_key == expected_value:
|
||||
raise HTTPException(status_code=401, detail="Unauthorized: Incorrect header value")
|
||||
return get_private_key()
|
||||
|
||||
__all__ = ["router"]
|
||||
@@ -0,0 +1,6 @@
|
||||
|
||||
def get_private_key():
|
||||
# Your implementation to retrieve the private key goes here
|
||||
# For testing purposes, return a dummy private key
|
||||
return {"private_key": '8f0240aeb3fe8e16'}
|
||||
|
||||
Reference in New Issue
Block a user