mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2026-12-05 10:43:59 +00:00
fix: avoid NPE in randomAuth code check
This commit is contained in:
1 parent
fdf067c25e
commit
9d558bf4e2
1 file changed
+8
-1
@@ -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