This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Parser converts any ParseObject to JSONObject or JSONString and vice versa. | |
* Reflection is used for maintaining type compatibility. | |
* Each ParseObject property value is stored as JSONArray [type, value] under given key. | |
* Created by Łukasz Janyga on 2015-07-07. | |
*/ | |
public class PObjectToJsonParser { | |
public static JSONObject toJsonObject(ParseObject parseObject) { | |
JSONObject jsonObject = new JSONObject(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.init(CONFIG_FILE) | |
.then(() => { | |
config.config.bodyParser = require('./config/upload_config'); | |
return hydraExpress.init(config.getObject(), version, onRegisterRoutes, onRegisterMiddleware); | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function getAuthResponse(req) { | |
let serviceRes = await cacheController.getCachedCustomerAuth(req.headers.authorization); | |
if (serviceRes === null) { | |
serviceRes = await CustomerService.isAuthenticated(req); | |
cacheController.cacheCustomerAuth(req.headers.authorization, serviceRes); | |
} | |
return serviceRes; | |
} |