* Change join route to just /join

This commit is contained in:
shockrah 2021-05-26 12:08:55 -07:00
parent 03f6624943
commit 990ad347f7
2 changed files with 3 additions and 3 deletions

View File

@ -96,7 +96,7 @@ if __name__ == '__main__':
login_req, jwt = login(admin)
if jwt is None:
print('Unable to /login - stopping now to avoid pointless failure')
req.show_response()
login_req.show_response()
exit(1)
admin.jwt = jwt
@ -135,7 +135,7 @@ if __name__ == '__main__':
req(admin, 'get', '/members/me', {}, 200),
req(admin, 'get', '/members/get_online', {}, 200),
req(admin, 'post', '/members/me/nickname', {'nick': f'randy-{now}'}, 200),
req(admin , 'get', '/invite/join', {'code': 123}, 404),
req(admin , 'get', '/join', {'code': 123}, 404),
req(admin , "get", "/meta", {}, 200),
req(admin, 'get', '/neighbor/list', {}, 200),
req(admin,'post', '/neighbor/add', {}, 200, body=to_json(tmp_neighbor)),

View File

@ -31,7 +31,7 @@ pub const UPDATE_NEIGHBOR: Rstr = "/neighbor/update"; // @requires perms::ad
pub const REMOVE_NEIGHBOR: Rstr = "/neighbor/delete"; // @requires perms::add_neighbor @url(unique)
pub fn is_open(path: &str) -> bool {
return path.starts_with("/join") || path.starts_with("/meta");
return path.starts_with(INVITE_JOIN) || path.starts_with("/meta");
}
pub fn requires_perms(path: &str) -> bool {