api specs defined
This commit is contained in:
parent
cf3f121e77
commit
6b164aa983
7 changed files with 20 additions and 2 deletions
Binary file not shown.
|
|
@ -4,8 +4,6 @@ from fastapi import APIRouter
|
|||
from fastapi import FastAPI
|
||||
|
||||
|
||||
# TODO: Security and CORS
|
||||
# TODO: Api Specs definieren (Subscription, Comment, Like)
|
||||
# TODO: Settings hinzufügen
|
||||
# TODO: Deploy
|
||||
|
||||
|
|
|
|||
Binary file not shown.
3
backend/src/backend/models/comment.py
Normal file
3
backend/src/backend/models/comment.py
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
|
||||
# Comment: id, slug, content, datetime, foreign key: user
|
||||
|
||||
8
backend/src/backend/models/reaction.py
Normal file
8
backend/src/backend/models/reaction.py
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
|
||||
# Reaction: slug and visitor_hash[(UUID or IP from Header) and salt] (foreign_key)
|
||||
|
||||
#Reference: https://isaacfei.com/posts/simple-like-system/
|
||||
|
||||
# addReaction
|
||||
# delete Reaction
|
||||
# get Reactions by slug
|
||||
|
|
@ -9,3 +9,4 @@ class Subscription(SubscriptionBase, table=True):
|
|||
id: int | None = Field(default=None, primary_key=True)
|
||||
active: bool = Field(default=True)
|
||||
|
||||
# TODO: move to user
|
||||
8
backend/src/backend/models/user.py
Normal file
8
backend/src/backend/models/user.py
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
|
||||
# User: id, email(unique), name(unique), usercode(f.e. WLAID, unique) , subscription(bool), active=false
|
||||
|
||||
# CreateUser <- mail, Name
|
||||
# Login Rate Limit! -> token for everything else
|
||||
# Forgot Code <- token, email
|
||||
# Delete User <- token
|
||||
# change mail <- token, mail
|
||||
Loading…
Add table
Reference in a new issue