PrintedItem (catalog: code, name, image, cached quantityonhand, per-item threshold, bin) and PrintedItemTransaction (the ledger: signed quantity change attributed to a badge-resolved employee). Both registered in PLUGIN_TABLE_OWNERS; 0001 is a post-cutover real baseline. The migration-guard test learns the new expected head. Routes are a placeholder ping until the next stage - the scaffold's list route imported the deleted scaffold model, which surfaces as an empty 'Migration error' because the alembic env imports the models package.
19 lines
592 B
Python
19 lines
592 B
Python
"""Printedparts plugin API routes.
|
|
|
|
Stage 2 placeholder: the blueprint must import cleanly for plugin discovery
|
|
and migrations (the alembic env imports the models package, which pulls in
|
|
plugin.py and this module). Real endpoints land in the next stage.
|
|
"""
|
|
|
|
from flask import Blueprint
|
|
|
|
from shopdb.api import success_response
|
|
|
|
printedparts_bp = Blueprint('printedparts', __name__)
|
|
|
|
|
|
@printedparts_bp.route('/ping', methods=['GET'])
|
|
def ping():
|
|
"""Liveness probe for the lab: proves the blueprint is registered."""
|
|
return success_response({'plugin': 'printedparts', 'status': 'ok'})
|