from flask import Blueprint, jsonify, request
from app.models import Album
from .util import serialize, all_response, single_response

albums_blueprint = Blueprint('albums', __name__)

# Get a list of all albums


@albums_blueprint.route('/')
def get_albums():
    return all_response(Album, 'albums')

# Get a specific album based on ID


@albums_blueprint.route('/<album_id>')
def get_album(album_id):
    return single_response(Album, album_id)
