Format.
This commit is contained in:
parent
488afdcc74
commit
4c601e8333
@ -78,7 +78,7 @@ class Application(BaseApplication):
|
|||||||
self.router.add_view("/register.json", RegisterView)
|
self.router.add_view("/register.json", RegisterView)
|
||||||
self.router.add_get("/http-get", self.handle_http_get)
|
self.router.add_get("/http-get", self.handle_http_get)
|
||||||
self.router.add_get("/http-photo", self.handle_http_photo)
|
self.router.add_get("/http-photo", self.handle_http_photo)
|
||||||
self.router.add_get("/rpc.ws",RPCView)
|
self.router.add_get("/rpc.ws", RPCView)
|
||||||
self.add_subapp(
|
self.add_subapp(
|
||||||
"/docs",
|
"/docs",
|
||||||
DocsApplication(path=pathlib.Path(__file__).parent.joinpath("docs")),
|
DocsApplication(path=pathlib.Path(__file__).parent.joinpath("docs")),
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
|
|
||||||
|
|
||||||
from snek.model.notification import NotificationModel
|
from snek.model.notification import NotificationModel
|
||||||
from snek.system.mapper import BaseMapper
|
from snek.system.mapper import BaseMapper
|
||||||
|
|
||||||
|
|
||||||
class NotificationMapper(BaseMapper):
|
class NotificationMapper(BaseMapper):
|
||||||
table_name = "notification"
|
table_name = "notification"
|
||||||
model_class = NotificationModel
|
model_class = NotificationModel
|
||||||
|
@ -28,7 +28,7 @@ class ChannelMemberService(BaseService):
|
|||||||
model["is_read_only"] = is_read_only
|
model["is_read_only"] = is_read_only
|
||||||
model["is_muted"] = is_muted
|
model["is_muted"] = is_muted
|
||||||
model["is_banned"] = is_banned
|
model["is_banned"] = is_banned
|
||||||
print(model.record,flush=True)
|
print(model.record, flush=True)
|
||||||
if await self.save(model):
|
if await self.save(model):
|
||||||
return model
|
return model
|
||||||
raise Exception(f"Failed to create channel member: {model.errors}.")
|
raise Exception(f"Failed to create channel member: {model.errors}.")
|
||||||
|
@ -19,7 +19,7 @@ class BaseView(web.View):
|
|||||||
@property
|
@property
|
||||||
def db(self):
|
def db(self):
|
||||||
return self.app.db
|
return self.app.db
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def services(self):
|
def services(self):
|
||||||
return self.app.services
|
return self.app.services
|
||||||
|
Loading…
Reference in New Issue
Block a user