add contacttypes seed and endpoint

This commit is contained in:
2021-07-02 16:49:14 +02:00
parent 4ca8660b1d
commit f589ed063e
5 changed files with 80 additions and 12 deletions

View File

@ -4,7 +4,7 @@ from functools import wraps
from ki.auth import auth
from ki.handlers import update_profile as update_profile_handler
from ki.models import Language, Skill, Token, User
from ki.models import ContactType, Language, Skill, Token, User
from app import app
@ -133,6 +133,12 @@ def update_profile(user_id):
return update_profile_handler(int(user_id))
@app.route("/contacttypes")
@token_auth
def get_contacttypes():
return handle_completion_request(ContactType, "contacttypes")
@app.route("/skills")
@token_auth
def get_skills():