mirror of
https://github.com/notherealmarco/WASAPhoto.git
synced 2025-05-05 12:22:35 +02:00
Add database query status (and improved response), photos, likes, comments, bans
This commit is contained in:
parent
519ae22197
commit
abbd5bc494
22 changed files with 1118 additions and 72 deletions
|
@ -19,7 +19,7 @@ const (
|
|||
UNAUTHORIZED = 1
|
||||
FORBIDDEN = 2
|
||||
USER_NOT_FOUND = 3
|
||||
)
|
||||
) // todo: here?
|
||||
|
||||
// RequestContext is the context of the request, for request-dependent parameters
|
||||
type RequestContext struct {
|
||||
|
@ -34,6 +34,7 @@ type RequestContext struct {
|
|||
|
||||
type Authorization interface {
|
||||
GetType() string
|
||||
Authorized(db database.AppDatabase) (bool, error)
|
||||
GetUserID() string
|
||||
Authorized(db database.AppDatabase) (AuthStatus, error)
|
||||
UserAuthorized(db database.AppDatabase, uid string) (AuthStatus, error)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue