Code Monkey home page Code Monkey logo

Comments (5)

friktor avatar friktor commented on July 1, 2024

в config/policies.js закомментируй строки
UserController: { create: 'admin' },
после этого отправь post запрос на /user/create, с параметрами
username - логин
password - пароль
admin - true (чтобы получить права админа)
Как только пользователь будет создан раскомментируй строки в policies.js чтобы активировать защиту, и авторизацию

from sails-blog.

ogrotten avatar ogrotten commented on July 1, 2024

Привет .

Я учусь паруса и использовал свой ​​блог как инструмент обучения.

Чтобы создать пользователя , я уже прокомментировал бы policies.js > UserController раздел . Что гиперссылка я бы использовать, чтобы создать пользователя ? Я не могу показаться, чтобы получить правильный формат .

Машина переведена . (можно , вероятно, сказать)

from sails-blog.

friktor avatar friktor commented on July 1, 2024

Hey @ogrotten.
You must send new POST HTTP request. After disable police (commented line) you send request to:
http://127.0.0.1:1337:9000/user/create
With params: username & password for your account.
How send request without form or jquery XHR? Postman - app for chrome, visual REST.
.
Actions:
1: Open Postman
2: Set type - POST (the right of URL line)
3: Enter url our app (see top)
4: Enter params to fields.
5: Apply request with click "Send" button.
6: If success - show request json with record in db.

P.S - Use the best English in a matter of course that seems to be more clear on russian language, but I could barely understand what you want of me. )

from sails-blog.

ogrotten avatar ogrotten commented on July 1, 2024

I know what you mean about translation. It changes words, but is hard to understand (= Chinese to English is the worst.

I forgot about Postman! Thank you for the screenshot.

And thank you so much for the source comments. Machine translation was hard to understand but it is a big help!

from sails-blog.

Qlipoth avatar Qlipoth commented on July 1, 2024

Зарегестрировал админа, в бд появилась соотв. запись в таблице User. Пытаюсь залогиниться, и ничего не происходит, бесконечно долгая загрузка страницы. В итоге появляется надпись "Данные не получены", а в адресной строке URl http://localhost:1337/session/create. В консоле conemu никаких ошибок нет. Как я понял почему-то не создается сессия

from sails-blog.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.