rework superuser api

This commit is contained in:
Jimmy Zelinskie 2016-03-25 18:44:11 -04:00 committed by Jimmy Zelinskie
parent 4079dba167
commit 35ed73e195
4 changed files with 205 additions and 60 deletions

View file

@ -12,6 +12,7 @@ from random import SystemRandom
import resumablehashlib
import toposort
from enum import Enum
from peewee import *
from sqlalchemy.engine.url import make_url
@ -869,6 +870,9 @@ class TorrentInfo(BaseModel):
)
class ServiceKeyApprovalType(Enum):
SUPERUSER = 'Super User API'
_ServiceKeyApproverProxy = Proxy()
class ServiceKeyApproval(BaseModel):
approver = ForeignKeyField(_ServiceKeyApproverProxy, null=True)