package com.example.webapi.controller; import com.example.webapi.service.DataSyncService; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RestController; @RestController public class OnceWeighingController { private final DataSyncService dataSyncService; public OnceWeighingController(DataSyncService dataSyncService) { this.dataSyncService = dataSyncService; } @PostMapping("/once-weighing/sync") public ResponseEntity syncData() { dataSyncService.syncOnceIncrementalData(); return ResponseEntity.ok().build(); } }