Example #1
0
def get_links(link_service):
    params = dict(request.params)
    for param in ('page', 'size'):
        if param in params:
            params[param] = int(params[param])

    links_page = link_service.find(**params)
    links_page['objects'] = [serialize_link(i) for i in links_page['objects']]
    return links_page
Example #2
0
def get_links(link_service):
    params = dict(request.params)
    for param in ('page', 'size'):
        if param in params:
            params[param] = int(params[param])

    links_page = link_service.find(**params)
    links_page['objects'] = [serialize_link(i) for i in links_page['objects']]
    return links_page
Example #3
0
def add_link(link_service):
    return serialize_link(link_service.create(deserialize_link(
        request.json), ))
Example #4
0
def get_link(link_service, key):
    return serialize_link(link_service.get(key=key), )
Example #5
0
def add_link(link_service):
    return serialize_link(link_service.create(
        deserialize_link(request.json),
    ))
Example #6
0
def get_link(link_service, key):
    return serialize_link(
        link_service.get(key=key),
    )