在APPSOT api资源管理器中运行带有祖先查询的下端点函数会返回503代码错误,而在本地主机devserver上的api资源管理器上运行相同的代码时效果良好。
@ApiMethod(name = "getConferencesCreated",
path = "getConferencesCreated",
httpMethod = HttpMethod.POST
)
public List<Conference> getConferencesCreated(final User user) throws UnauthorizedException {
if (user == null) {
throw new UnauthorizedException("Authorization required");
}
String userId = user.getUserId();
Key<Profile> userKey = Key.create(Profile.class, userId);
return ofy().load().type(Conference.class)
.ancestor(userKey)
.order("name").list();
}