mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2026-02-24 06:05:23 +00:00
fix: avoid NPE in randomAuth code check
This commit is contained in:
@@ -509,6 +509,13 @@ public class ParserApi {
|
|||||||
*/
|
*/
|
||||||
@RouteMapping(value = "/randomAuth", method = RouteMethod.GET)
|
@RouteMapping(value = "/randomAuth", method = RouteMethod.GET)
|
||||||
public Future<JsonObject> getRandomAuth(String panType) {
|
public Future<JsonObject> getRandomAuth(String panType) {
|
||||||
return dbService.getRandomDonatedAccount(panType);
|
return dbService.getRandomDonatedAccount(panType).map(res -> {
|
||||||
|
if (Integer.valueOf(200).equals(res.getInteger("code")) && res.getJsonObject("data") != null) {
|
||||||
|
JsonObject data = res.getJsonObject("data");
|
||||||
|
String encryptedAuth = AuthParamCodec.encode(data);
|
||||||
|
data.put("encryptedAuth", encryptedAuth);
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user