In advanced-app i create new module api (just copy backend).
And fix route in OpenServer:
Set RestApi Settings like this: https://www.yiiframework.com/doc/guide/2.0/en/rest-quick-start
But for url http://api/users I get 404
How fix it?
Git link: https://github.com/triest/Insigne/tree/master/api
In config/main.php need fix 'controllerNamespace'
Related
Does anyone know a way of getting details of DLC and Bundles from steam?
I can easily get App details with the following URL: (Borderlands 2)
http://store.steampowered.com/api/appdetails?appids=49520
This is the store page, notice the GET part of the URL is /app/{id}/
http://store.steampowered.com/app/49520/
Now I need to get the same sort of result from the API for a bundle.
This is the store page, notice the GET part of the URL is /sub/{id}/
http://store.steampowered.com/sub/32848/
I tried
http://store.steampowered.com/api/subdetails?subids=32848
and get Access Denied.
Any suggestions?
You should use package instead of sub to get the information.
You can use below link to access the package info
http://store.steampowered.com/api/packagedetails?packageids=32848
There is currently no way to get bundle info, without scraping the HTML. Only apps/packages.
I'm trying to redirect front end routes to the admin dashboard, as I'm using the Bolt installation as a REST API back end. Here's how I'm routing the content:
contentlink:
path: /{contenttypeslug}/{slug}
defaults: { _controller: 'Bolt\Controllers\Backend::dashboard' }
requirements:
contenttypeslug: 'Bolt\Controllers\Routing::getAnyContentTypeRequirement'
So, all I've done is use the dashboard controller. When I try to visit one of those routes, I get the following whoops error:
Twig_Error_Loader
Template "dashboard/dashboard.twig" is not defined ()
So for some reason it's not looking in the correct place for the template. Is there a way to correct this?
This looks like it's to do with the Twig path which is setup differently depending on whether there is a frontend or backend request.
you can always add a path to the Twig environment that Bolt uses with the following call:
$app['twig.loader.filesystem']->prependPath("/path/to/twig");
The path to the backend twig templates may vary but usually this will work.
$path = $app['resources']->getPath('app/view/twig');
$app['twig.loader.filesystem']->prependPath($path);
I am having an issue with an AJAX call to a controller action, using POST and having 3 parameters sent and return JSON data. Whenever I try to call that on the developement server, it throws a 500 (Internal Server Error), with the description
The matched route does not include a 'controller' route value, which is required.
The main problem with this, is that on my local machine it actually works. The way the websites I am working on are structured, is without any App_Start files (so no custom route config).
Is there anyone who could help me with this? I am struggling with this for days now. Please keep in mind that I am trying this in Sitecore 7.1 (MVC) and IIS 7.5.
Thank you.
Best regards,
Marius.
The absence of App_Start files in your solution doesn't guarantee there aren't any custom routes. Check Global.asax in your local environment vs your development server as this is another area where custom routes may have been set up.
I am using yii2-user module on top of the standard Yii2 advanced demo.
Yii2-user provides it's own login function at /user/security/login and linking directly to that works perfectly.
However the advanced demo overides that and directs the call to /user/login probably using the internal routes but I cant track down where that is happening.
I need to tell my Yii2 site not to chip in its own login ( which I have deleted ) and to retain the route to /user/security/login.
config file is directing user to the dektrium yii2-user module and it all seems to be working, it's just the default action into the backend page that reroutes to user/login when a visitor is a guest instead of a registered admin.
Backend has its own configuration, you should simply modify user component loginUrl in backend/config/main.php .
Inside your backend config.php add one more component
'user' => [
'loginUrl' => ['user/security/login'],
],
It helps me out in frontend
Following the directions from this answer: Search for users on Ejabberd2 using smack, fails
I tried with my own ejabberd+asmack setup but continue to get
service-unavailable (503)
response. Its possible it has something to do with the searchService argument of UserSearchManager.getSearchForm(String searchService)
For an ejabberd server, from where do I figure out or configure the url for searchService?
instead of "search."+ connection.getServiceName() use "vjud."+connection.getServiceName().