增加上传和获取定位接口

This commit is contained in:
2025-08-26 09:23:05 +08:00
parent a3d5df25c0
commit 49572f46d7
8 changed files with 229 additions and 6 deletions

View File

@@ -7,6 +7,7 @@ import com.onekeycall.videotablet.result.Result;
import com.onekeycall.videotablet.service.DeviceSnService;
import com.onekeycall.videotablet.service.UserService;
import com.onekeycall.videotablet.utils.JwtUtil;
import jakarta.validation.Valid;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -31,8 +32,8 @@ public class ContactController {
@PostMapping("/user_add_contact")
public Result userAddContact(
@RequestHeader("Authorization") String authHeader, @RequestHeader("Device-ID") String deviceId,
@RequestParam(value = "user_id") String userId, @RequestParam(value = "sn") String sn
, @RequestBody Contact contact) {
@RequestParam(value = "user_id") String userId, @RequestParam(value = "sn") String sn,
@Valid @RequestBody Contact contact) {
if (!authHeader.startsWith("Bearer ")) {
return Result.error().message("Invalid Authorization header");