Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sails 1.0 sails.controllers #4672

Open
Hodor9898 opened this issue May 30, 2018 · 3 comments
Open

sails 1.0 sails.controllers #4672

Hodor9898 opened this issue May 30, 2018 · 3 comments
Labels
docs Related to the content of the documentation itself (i.e. not any particular feature on sailsjs.com) does this answer your question?

Comments

@Hodor9898
Copy link

Hi,

A lot of hooks used to add controllers using sails.controllers, since sails 1.0 that functionality is broken...
and a lot of useful dependencies do not work any more, I really am very disappointed in the sails team, so many useful dependencies stop working after each update, it is hard to work with this framework this way...

I tried using the sails-auth-new dependency and it doesn't work with sails 1.0 because it attempts to register its controllers which causes:

warn: Ignored attempt to bind route (/logout) to unknown action { controller: 'AuthController',
skipAssets: true,
action: 'logout' }

I am going to fork this dependency and try and fix it,
how can i register a controller?

@rachaelshaw
Copy link
Member

Hi @Hodor9898,

A lot changed with the release of Sails 1.0, but that's not super unusual for a major version release -- and I firmly believe that most of the changes in 1.0 were for the better.

The thing about 3rd party packages is that they're not a core part of Sails, and because we don't maintain them ourselves, we have no control over their quality or compatibility with new versions of the framework. If your app depends on a lot of installable hooks that were developed specifically for Sails v0.12 and aren't compatible with 1.0, then it might make sense to hold off on upgrading your project until you've found other solutions.

To answer your question about how to register actions programmatically in a custom hook: check out the docs on sails.registerAction().

That said, it looks like you're trying to implement authentication for your app -- rather than relying on a 3rd party package for that, I highly recommend generating new apps with the "Web App" template if you're able to, which has login built in.

Hope this helps!

@sailsbot
Copy link

Hi @Hodor9898! It looks like you may have removed some required elements from the initial comment template, without which I can't verify that this post meets our contribution guidelines. To re-open this issue, please copy the template from here, paste it at the beginning of your initial comment, and follow the instructions in the text. Then post a new comment (e.g. "ok, fixed!") so that I know to go back and check.

Sorry to be a hassle, but following these instructions ensures that we can help you in the best way possible and keep the Sails project running smoothly.

*If you feel this message is in error, or you want to debate the merits of my existence (sniffle), please contact inquiries@sailsjs.com

@raqem raqem transferred this issue from balderdashy/sails-docs Mar 12, 2019
@raqem raqem added does this answer your question? docs Related to the content of the documentation itself (i.e. not any particular feature on sailsjs.com) and removed needs cleanup labels Mar 12, 2019
@raqem
Copy link
Contributor

raqem commented Mar 12, 2019

Hi @Hodor9898,
We are in the processes of moving all open Sails issues into one repository to help the devs keep a better eye on goings ons.
~Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Related to the content of the documentation itself (i.e. not any particular feature on sailsjs.com) does this answer your question?
Development

No branches or pull requests

4 participants