MCPcopy
hub / github.com/langbot-app/LangBot / _

Method _

src/langbot/pkg/api/http/controller/groups/user.py:14–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12 async def initialize(self) -> None:
13 @self.route('/init', methods=['GET', 'POST'], auth_type=group.AuthType.NONE)
14 async def _() -> str:
15 if quart.request.method == 'GET':
16 return self.success(data={'initialized': await self.ap.user_service.is_initialized()})
17
18 if await self.ap.user_service.is_initialized():
19 return self.fail(1, 'System already initialized')
20
21 json_data = await quart.request.json
22
23 user_email = json_data['user']
24 password = json_data['password']
25
26 await self.ap.user_service.create_user(user_email, password)
27
28 return self.success()
29
30 @self.route('/auth', methods=['POST'], auth_type=group.AuthType.NONE)
31 async def _() -> str:

Callers

nothing calls this directly

Calls 15

strFunction · 0.85
successMethod · 0.80
is_initializedMethod · 0.80
failMethod · 0.80
create_userMethod · 0.80
authenticateMethod · 0.80
generate_jwt_tokenMethod · 0.80
http_statusMethod · 0.80
get_user_by_emailMethod · 0.80
reset_passwordMethod · 0.80
change_passwordMethod · 0.80

Tested by

no test coverage detected