summaryrefslogtreecommitdiff
path: root/opendc/api/v1/specifications/memories/endpoint.py
blob: b275b6f09faf6c546c1bd4bb5d31f8cb3825441d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from opendc.models.memory import Memory
from opendc.util.rest import Response

def GET(request):
    """Get a list of the specifications of all Memories."""

    # Get the Memories

    memories = Memory.query()

    # Return the Memories

    return Response(
        200,
        'Successfully retrieved Memories.',
        [x.to_JSON() for x in memories]
    )