use of com.formkiq.stacks.api.handler.PublicWebhooksRequestHandler in project formkiq-core by formkiq.
the class CoreRequestHandler method findRequestHandler.
@Override
@SuppressWarnings("returncount")
public ApiGatewayRequestHandler findRequestHandler(final String method, final String resource) throws NotFoundException {
String s = "options".equals(method) ? method : resource;
if (isEnablePublicUrls && "/public/documents".equals(s)) {
return new PublicDocumentsRequestHandler();
}
if (s.startsWith("/public/webhooks")) {
return new PublicWebhooksRequestHandler();
}
if (s.startsWith("/private/webhooks")) {
return new PrivateWebhooksRequestHandler();
}
ApiGatewayRequestHandler hander = URL_MAP.get(s);
if (hander != null) {
return hander;
}
throw new NotFoundException(resource + " not found");
}
Aggregations