1
This commit is contained in:
@@ -43,14 +43,11 @@ public class AuthController {
|
||||
public JsonData saveAuth(@RequestBody Map<String, Object> data) {
|
||||
String serviceName = (String) data.get("serviceName");
|
||||
String authKey = (String) data.get("authKey");
|
||||
|
||||
if (serviceName == null || authKey == null) return JsonData.buildError("serviceName和authKey不能为空");
|
||||
|
||||
AuthTokenEntity entity = authTokenRepository.findByServiceName(serviceName).orElse(new AuthTokenEntity());
|
||||
entity.setServiceName(serviceName);
|
||||
entity.setToken(authKey);
|
||||
authTokenRepository.save(entity);
|
||||
|
||||
return JsonData.buildSuccess("认证信息保存成功");
|
||||
}
|
||||
|
||||
@@ -104,7 +101,7 @@ public class AuthController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除缓存数据 - POST方式
|
||||
* 删除缓存数据
|
||||
*/
|
||||
@PostMapping("/cache/delete")
|
||||
public JsonData deleteCacheByPost(@RequestParam String key) {
|
||||
@@ -133,7 +130,7 @@ public class AuthController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备ID(硬件UUID)
|
||||
* 获取设备ID
|
||||
*/
|
||||
@GetMapping("/device-id")
|
||||
public JsonData getDeviceId() {
|
||||
|
||||
Reference in New Issue
Block a user