forked from retoor/devplacepy
Continuous Delivery could never be turned off once a crop was planted. Add a one-shot per-plot "stop after harvest" flag (POST /game/plot/stop, Devii tool game_plot_stop, game_plots.stop_after_harvest), cleared by the next plant, autoreplant claim or Refactor. Autoreplant now also respects crop locks through the shared _crop_lock predicate. Plan and measurements in happyplanting.md. Also includes the pending community sync, node network and related work in the tree; the full suite passed (4999) with all of it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
22 lines
625 B
Python
22 lines
625 B
Python
# retoor <retoor@molodetz.nl>
|
|
|
|
from typing import Annotated
|
|
|
|
from fastapi import APIRouter, Depends, Request
|
|
|
|
from devplacepy.dependencies import json_or_form
|
|
from devplacepy.routers.sync._shared import require_sync_caller, run_batch
|
|
from devplacepy.services.sync.records import SyncBatchForm
|
|
from devplacepy.services.sync.spec import KIND_VOTES
|
|
|
|
router = APIRouter()
|
|
|
|
|
|
@router.post("/votes")
|
|
async def sync_votes(
|
|
request: Request,
|
|
user: Annotated[dict, Depends(require_sync_caller)],
|
|
data: Annotated[SyncBatchForm, Depends(json_or_form(SyncBatchForm))],
|
|
):
|
|
return run_batch(request, user, KIND_VOTES, data)
|