feat(webapi): add skeleton for User API
This commit is contained in:
parent
413dedd29e
commit
3b40baf64b
@ -49,7 +49,7 @@ def create_app(test_config=None):
|
|||||||
app.add_url_rule('/', endpoint='index')
|
app.add_url_rule('/', endpoint='index')
|
||||||
|
|
||||||
from . import webapi
|
from . import webapi
|
||||||
api.add_resource(webapi.HelloWorld, '/api/hello')
|
api.add_resource(webapi.User, '/api/user/<string:username>')
|
||||||
api.init_app(app)
|
api.init_app(app)
|
||||||
|
|
||||||
# TODO create OUs
|
# TODO create OUs
|
||||||
|
@ -2,6 +2,10 @@ from flask import Blueprint
|
|||||||
from flask_restful import Resource
|
from flask_restful import Resource
|
||||||
|
|
||||||
|
|
||||||
class HelloWorld(Resource):
|
import lumi2.ldap as ldap
|
||||||
def get(self):
|
from lumi2.usermodel import User
|
||||||
return {'hello': 'world'}
|
|
||||||
|
|
||||||
|
class User(Resource):
|
||||||
|
def get(self, username):
|
||||||
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user