|
1234567891011121314151617181920 |
- 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<Void> syncData() {
- dataSyncService.syncOnceIncrementalData();
- return ResponseEntity.ok().build();
- }
- }
|