mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 01:05:42 +00:00
18 lines
412 B
Python
18 lines
412 B
Python
from flask import request, url_for
|
|
from app.models import User
|
|
|
|
|
|
def user_endpoint_arguments_constructor():
|
|
return {'user_id': request.view_args['user_id']}
|
|
|
|
|
|
def user_dynamic_list_constructor():
|
|
user_id = request.view_args['user_id']
|
|
user = User.query.get_or_404(user_id)
|
|
return [
|
|
{
|
|
'text': user.username,
|
|
'url': url_for('.user', user_id=user_id)
|
|
}
|
|
]
|