This commit is contained in:
2025-04-07 21:57:17 +08:00
parent d5445fdc3e
commit f4a5b789db
29 changed files with 1752 additions and 3 deletions

View File

@@ -0,0 +1,28 @@
package com.mir4updater.backend.controller.apk;
import com.mir4updater.backend.dto.PakInfoJsonRequest;
import com.mir4updater.backend.result.Result;
import com.mir4updater.backend.service.PakInfoService;
import jakarta.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Collections;
@RestController
@RequestMapping("/android/upload_pak_info")
public class UploadPakInfoController {
@Autowired
private PakInfoService pakInfoService;
@PostMapping
public Result createData(@Valid @RequestBody PakInfoJsonRequest request) {
String id = pakInfoService.processData(request);
return Result.ok().data(Collections.singletonMap("uuid", id));
}
}