Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

21 строка
680B

  1. package com.example.webapi.controller;
  2. import com.example.webapi.service.DataSyncService;
  3. import org.springframework.http.ResponseEntity;
  4. import org.springframework.web.bind.annotation.PostMapping;
  5. import org.springframework.web.bind.annotation.RestController;
  6. @RestController
  7. public class OnceWeighingController {
  8. private final DataSyncService dataSyncService;
  9. public OnceWeighingController(DataSyncService dataSyncService) {
  10. this.dataSyncService = dataSyncService;
  11. }
  12. @PostMapping("/once-weighing/sync")
  13. public ResponseEntity<Void> syncData() {
  14. dataSyncService.syncOnceIncrementalData();
  15. return ResponseEntity.ok().build();
  16. }
  17. }