feat(backend): add publish readiness endpoint and enforce publish gate contract
add backend endpoint for publish readiness checks enforce publish gate contract before version publication make publish preconditions explicit and consistent for clients
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from fastapi import APIRouter, Depends, HTTPException, Query, status
|
||||
from fastapi import APIRouter, Depends, Query
|
||||
|
||||
from app.core.config import settings
|
||||
from app.repositories.audit import create_audit_event
|
||||
@@ -146,10 +146,8 @@ async def create_next_scheme_version_endpoint(
|
||||
current_version_number=current_scheme.current_version_number,
|
||||
)
|
||||
|
||||
if (
|
||||
expected_current_scheme_version_id is not None
|
||||
and expected_current_scheme_version_id != current_version.scheme_version_id
|
||||
):
|
||||
if expected_current_scheme_version_id and expected_current_scheme_version_id != current_version.scheme_version_id:
|
||||
from fastapi import HTTPException, status
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_409_CONFLICT,
|
||||
detail={
|
||||
|
||||
Reference in New Issue
Block a user