flag Q-transformations
This commit is contained in:
parent
0769d72868
commit
a6b476da43
@ -7,7 +7,7 @@ from v25.web.server.api import API
|
||||
|
||||
|
||||
def simple(_env, resp):
|
||||
resp(b'404 OK', [])
|
||||
resp('404 OK', [])
|
||||
return []
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ config.from_config(d)
|
||||
|
||||
app = Flask(__name__)
|
||||
app.wsgi_app = DispatcherMiddleware(simple, {
|
||||
'/api': API(__name__, DBStorage(d['db']))
|
||||
'/v25': API(__name__, DBStorage(d['db']))
|
||||
})
|
||||
app.config['ENV'] = 'development'
|
||||
app.run(port=5013)
|
||||
|
@ -13,10 +13,10 @@ class Flags:
|
||||
return Q_FLAG in self.flags
|
||||
|
||||
def deq(self) -> str:
|
||||
return self.flags.replace(Q_FLAG, '')
|
||||
return Flags(self.flags.replace(Q_FLAG, '')).deq() if self.quable() else self.flags
|
||||
|
||||
def enq(self) -> str:
|
||||
return self.deq() + Q_FLAG
|
||||
return self.flags if self.quable() else self.flags + Q_FLAG
|
||||
|
||||
|
||||
Flags.default = Flags('<unedited>').enq()
|
||||
|
Loading…
Reference in New Issue
Block a user