mirror of
https://github.com/StanGirard/quivr.git
synced 2024-12-24 11:52:45 +03:00
15 lines
413 B
Python
15 lines
413 B
Python
|
|
from logger import get_logger
|
|
from models.settings import CommonsDep
|
|
from models.users import User
|
|
|
|
logger = get_logger(__name__)
|
|
|
|
def create_user(commons: CommonsDep, user:User, date):
|
|
logger.info(f"New user entry in db document for user {user.email}")
|
|
|
|
return(commons['supabase'].table("users").insert(
|
|
{"user_id": user.id, "email": user.email, "date": date, "requests_count": 1}).execute())
|
|
|
|
|