-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathroutes.py
More file actions
35 lines (29 loc) · 1.13 KB
/
routes.py
File metadata and controls
35 lines (29 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from tornado.web import StaticFileHandler
from controllers import *
routes = [
# static handler
("/static/(.*)", StaticFileHandler),
# authentication
("/login", LoginHandler, {"template": "Login.html"}),
("/github-oauth", GithubOAuthHandler),
("/github-oauth-callback", GithubOAuthCallbackHandler),
("/logout", LogoutHandler),
("/registration", RegistrationHandler, {"template": "Registration.html"}),
# handlers
("/", BaseHandler, {"template": "Main.html"}),
("/teams", BaseHandler, {"template": "Teams.html"}),
("/chat", ChatHandler, {"template": "Chat.html"}),
("/profile/(?P<user_id>[A-Za-z0-9-]+)", ProfileHandler, {"template": "Profile.html"}),
("/profile", ProfileHandler, {"template": "Profile.html"}),
# Api
("/api/v1/users", UsersApi),
("/api/v1/user/(?P<user_id>[A-Za-z0-9-]+)", UserApi),
("/api/v1/user", UserApi),
("/api/v1/search-users", SearchUsersApi),
("/api/v1/invites", InvitesApi),
("/api/v1/chats", ChatsApi),
("/api/v1/teams", TeamsApi),
("/api/v1/conversations", ConversationsApi),
# websockets
("/ws", WebSocketsHandler)
]