feat(webapi): add skeleton for User API

This commit is contained in:
Julian Lobbes 2022-11-21 20:32:46 +01:00
parent 413dedd29e
commit 3b40baf64b
2 changed files with 8 additions and 4 deletions

View File

@ -49,7 +49,7 @@ def create_app(test_config=None):
app.add_url_rule('/', endpoint='index')
from . import webapi
api.add_resource(webapi.HelloWorld, '/api/hello')
api.add_resource(webapi.User, '/api/user/<string:username>')
api.init_app(app)
# TODO create OUs

View File

@ -2,6 +2,10 @@ from flask import Blueprint
from flask_restful import Resource
class HelloWorld(Resource):
def get(self):
return {'hello': 'world'}
import lumi2.ldap as ldap
from lumi2.usermodel import User
class User(Resource):
def get(self, username):
pass