Skip to content

Commit

Permalink
SFR-2413: Migrate edition endpoint to use plural noun (#481)
Browse files Browse the repository at this point in the history
  • Loading branch information
kylevillegas93 authored Dec 19, 2024
1 parent 076adba commit 50b1f7f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion api/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from logger import create_log
from .blueprints import (
search, work, info, edition, utils, link, opds, collection, citation, fulfill
search, work, info, edition, editions, utils, link, opds, collection, citation, fulfill
)
from .utils import APIUtils

Expand All @@ -31,6 +31,7 @@ def __init__(self, dbEngine, redisClient):
self.app.register_blueprint(search)
self.app.register_blueprint(work)
self.app.register_blueprint(edition)
self.app.register_blueprint(editions)
self.app.register_blueprint(utils)
self.app.register_blueprint(link)
self.app.register_blueprint(opds)
Expand Down
2 changes: 1 addition & 1 deletion api/blueprints/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from .drbCitation import citation
from .drbCollection import collection
from .drbEdition import edition
from .drbEdition import edition, editions
from .drbInfo import info
from .drbLink import link
from .drbOPDS2 import opds
Expand Down
2 changes: 2 additions & 0 deletions api/blueprints/drbEdition.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
logger = create_log(__name__)

edition = Blueprint('edition', __name__, url_prefix='/edition')
editions = Blueprint('editions', __name__, url_prefix='/editions')


@edition.route('/<edition_id>', methods=['GET'])
@editions.route('/<edition_id>', methods=['GET'])
def get_edition(edition_id):
logger.info(f'Getting edition with id {edition_id}')
response_type = 'singleEdition'
Expand Down
2 changes: 1 addition & 1 deletion swagger.v4.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
}
}
},
"/edition/{id}": {
"/editions/{id}": {
"get": {
"tags": ["digital-research-books"],
"summary": "v4 Get Single Edition",
Expand Down

0 comments on commit 50b1f7f

Please sign in to comment.