Code Monkey home page Code Monkey logo

ngx-admin-bundle-support's People

Contributors

32penkin avatar akveo-private avatar alexeykurbako avatar mishkolesnikov avatar stml89 avatar valentinkononov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ngx-admin-bundle-support's Issues

Error: Loading chunk

Hi ,
After npm run build:prod when we deploy the code to the production server on lms.admissiondesk.org we get this error on the first load :

ERROR Error: "Uncaught (in promise): Error: Loading chunk 6 failed.
(missing: http://lms.admissiondesk.org/6-es2015.8c364b8094b352391c69.js)

after refresh

ERROR Error: Uncaught (in promise): Error: Loading chunk 9 failed.
(missing: http://lms.admissiondesk.org/9-es2015.801f1f734c8f87d9bd0f.js)
Error: Loading chunk 9 failed.

on some machines this error does not occur and it loads directly now after reading online we found this solution
https://stackoverflow.com/questions/44034039/angular-2-error-loading-chunk-failed
can you let us know were can we handle the same in our project this error does not occur with previous versions of ngx-admin only the purchased one has this error .

enforcing mongoDB model

Greetings,

I have bought "ngx-admin Backend Bundle Node + E-comm"

concerns:
on your structure of backend, I noticed that the model structure for MongoDB is not defined anywhere.

It obtains the model structure during the update/ inserts DTO mapping.

I need to define the structure and enforce it across the collection to add some restriction like the uniqueness of email etc.. or type of the field and do extra validation.
mongoose is well known for this.
const User = mongoose.model('User', {
firstName: String,
lastName: String,
email: String,
category: String,
userName: String,
password: String
});

or at least having something like this:
like db.collection('User').createIndex({ email: 1 }, { sparse: true, unique: true });

Please advice.

Thanks

user roles function not in place

Hi, I noticed the latest version of .NET IoT Bundle has RolesController, but it is not used in the frontend to manage the rolses of a user.

Shouldn't it included in the frontend?

node-js / mongo starter bundle - new user registration not working

"node-js / mongo starter bundle - new user registration not working"

Started mongodb as a docker container (mongo:latest).
Start the backend at http://localhost:3001
Start the frontend/

Register a new user with username and password.

And then when 'logging in', you get the home page MOMENTARILY.. and then the screen goes back to the registration screen. Same behavior if you use a different tab, different window, different browser altogether.

The user account is NOT created in the users collection of the mongodb (as evident from mongoexport of that collection).

Backend:

{"message":"Connecting to MongoDB client...","level":"info"}
{"message":"Seed Data","level":"info"}
{"message":"Server start listening port: 3001","level":"info"}
{"message":"MongoDB client has been successfully created","level":"info"}
{"message":"Seed Data","level":"info"}
{"message":"Seed Users Done","level":"info"}
{"message":"Seed User Activities Done","level":"info"}
{"message":"Seed Orders Done","level":"info"}
{"message":"Seed Traffic Done","level":"info"}

More information about the samples

There are little to none information about these code samples. Are they pieces of the bundle code? How am I supposed to use them for testing? Could someone provide some documentation about the samples?

On Running...

Went through the readme, getting this error:

{"error":"Internal Api Error: Failed to proxy the request to http://localhost:53973/, because the request to the proxy target failed. Check that the proxy target server is running and accepting requests to http://localhost:53973/.\n\nThe underlying exception message was 'An error occurred while sending the request.'.Check the InnerException for more details."}

Works when i run the angular server from the CLI, so something to do with the .net build config then? idk any help would be great

changing the password for current user log in

Greetings,

I have bought "ngx-admin Backend Bundle Node + E-comm"

http://localhost:4200/auth/reset-password
reset password:
the error is not returned in the GUI. example. I was putting 12345. the error on the console is “Password should be longer than 6 characters”
on the GUI. .. try later.
then I tried more than 6 char
I got :

{"level":"error"}
TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be one of type string, Buffer, TypedArray, or DataView. Received type undefined
at invalidArrayBufferView (internal/crypto/cipher.js:87:10)
at Decipher.update (internal/crypto/cipher.js:148:11)
at Object.decipherResetPasswordToken (/Users/mohammed-macbookPro/Development/Akveo - E-Commerce/node-ecom/backend/src/api/common/auth/cipherHelper.js:48:29)
at AuthService.resetPassword (/Users/mohammed-macbookPro/Development/Akveo - E-Commerce/node-ecom/backend/src/api/common/auth/authService.js:44:33)
at router.post (/Users/mohammed-macbookPro/Development/Akveo - E-Commerce/node-ecom/backend/src/api/common/auth/authController.js:45:6)
at Layer.handle [as handle_request] (/Users/mohammed-macbookPro/Development/Akveo - E-Commerce/node-ecom/backend/node_modules/express/lib/router/layer.js:95:5)
at next (/Users/mohammed-macbookPro/Development/Akveo - E-Commerce/node-ecom/backend/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/Users/mohammed-macbookPro/Development/Akveo - E-Commerce/node-ecom/backend/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/Users/mohammed-macbookPro/Development/Akveo - E-Commerce/node-ecom/backend/node_modules/express/lib/router/layer.js:95:5)
at /Users/mohammed-macbookPro/Development/Akveo - E-Commerce/node-ecom/backend/node_modules/express/lib/router/index.js:281:22

Regards,
Mohammed

editing current user api

Greetings,

on nodejs + ecomm version, I found that editing the current user is taking the id from the body, not from req.user.id. on the postman, managed to change the information for any user.

router.put('/current', (req, res) => {
userService
.editUser(req.body)
.then(user => res.send(user));
});

by the way, where the req.user is saved? can a hacker manipulate it? is it safe to take the information from it like depending on the role come from it.

in my case i build a checker afret auth, check the user role to allow him to perform the operation.

router.delete('/:id', authService.roleAuthorization(['admin']),(req, res) => {
userService
.deleteUser(req.params.id)
.then(() => res.send({ id: req.params.id }))
.catch(err => res.send(err));
});

on roleAuthorization, I check the req.role

Thanks

.net core bundle - issue with backend

Hi,

I have tried for a few hours now trying to browse the backend bundle api (.net core) but always get the 404 error not found:

image

The application builds successfully and the database tables are created and seeded correctly.

Please advise what I am doing wrong?

Thanks,
Vin

Mixins may not be defined within control directives or other mixins

ERROR in ./node_modules/css-loader?{"sourceMap":false,"importLoaders":1}!./node_modules/postcss-loader?{"ident":"postcss"}!./node_modules/sass-loader/lib/loader.js?{"sourceMap":false,"precision":8,"includePaths":[]}!./src/app/@theme/styles/styles.scss
Module build failed:
undefined
^
Mixins may not be defined within control directives or other mixins.
in C:\Users\AJ\Desktop\temptadmin-master\node_modules@nebular\theme\components\checkbox_checkbox.component.theme.scss (line 8, column 10)
Error:
undefined
^
Mixins may not be defined within control directives or other mixins.
in C:\Users\AJ\Desktop\temptadmin-master\node_modules@nebular\theme\components\checkbox_checkbox.component.theme.scss (line 8, column 10)
at options.error (C:\Users\AJ\Desktop\temptadmin-master\node_modules\node-sass\lib\index.js:291:26)
@ ./src/app/@theme/styles/styles.scss 4:14-214
@ multi ./node_modules/bootstrap/dist/css/bootstrap.css ./node_modules/typeface-exo/index.css ./node_modules/roboto-fontface/css/roboto/roboto-fontface.css ./node_modules/ionicons/scss/ionicons.scss ./node_modules/font-awesome/scss/font-awesome.scss ./node_modules/nebular-icons/scss/nebular-icons.scss ./node_modules/socicon/css/socicon.css ./node_modules/pace-js/templates/pace-theme-flash.tmpl.css ./src/app/@theme/styles/styles.scss

webpack: Failed to compile.
may not be defined within control directives or other mixins

getCurrentUser() at backend user.service issue

Hi.
I bought and installed netcoreStarter bundle, logged in as admin and when self-editing my profile it didn't show the right information.
After some debugging I got from Visual Studio Code the attached problems in getCurrentUser()
I tried a couple of things but couldn't make it work.
Would you help me on this issue?
backend_common_userservice_issue

Multi Application - Cant Register users and Admin Login doesnt work

Brought Node.js MongoDB E-Commerce Bundle - Multi-Application.
I am unable to login to the admin console. What is the admin password for the [email protected] account?

I am unable to create a new user. Mongodb is up and running, still, the registration form doesn't submit the details to the database.

I am unable to get out from the the login page. Just keeps getting redirected.

npm installation failing

currently using the ngx-admin/django/angular backend bundle. Even, with @latest version of npm, the installation is still failing all the time, and therefore can't run the project. Is there any issue with package.json file. Always getting an ENOENT failure and npm never called warning at the end.

requested http://localhost:3001/api/auth/sign-up: ERROR in [core: 96]: (sqlite3.OperationalError) no such table: user

teminal log
-desktop:~/Downloads/flask-starter/backend$ python manage.py runserver

  • Serving Flask app "api" (lazy loading)
  • Environment: production
    WARNING: Do not use the development server in a production environment.
    Use a production WSGI server instead.
  • Debug mode: on
  • Running on http://0.0.0.0:3001/ (Press CTRL+C to quit)
  • Restarting with stat
  • Debugger is active!
  • Debugger PIN: 147-039-505
    127.0.0.1 - - [30/Aug/2019 18:33:37] "OPTIONS /api/auth/sign-up HTTP/1.1" 200 -
    2019-08-30 18:33:38,005 127.0.0.1: requested http://localhost:3001/api/auth/sign-up: ERROR in [core: 96]: (sqlite3.OperationalError) no such table: user
    [SQL: SELECT user.id AS user_id, user.email AS user_email, user.password AS user_password, user.first_name AS user_first_name, user.last_name AS user_last_name, user.login AS user_login, user.age AS user_age, user.street AS user_street, user.city AS user_city, user.zip AS user_zip
    FROM user
    WHERE user.email = ?
    LIMIT ? OFFSET ?]
    [parameters: ('[email protected]', 1, 0)]
    (Background on this error at: http://sqlalche.me/e/e3q8)
    127.0.0.1 - - [30/Aug/2019 18:33:38] "POST /api/auth/sign-up HTTP/1.1" 500 -

different concerns on ngx-admin Backend Bundle Node + E-comm

Greetings,

I have bought "ngx-admin Backend Bundle Node + E-comm"

  1. The theme is not saved as per email
    selected user theme is saved to DB (for .net, .net core, java, node bundles).

  2. RTL support is not implemented in this version

  3. based on readme file: Basic role management and ACL is in place
    where is it?

  4. If I logged as admin, I cannot see the list of users. there is no users management.

  5. Sample order table and order details page integrated with backend
    I found only order list with CRUD. but no detail of the order

Regards,
Mohammed

Serilog logging is not implemented

On the Net Core Angular Starter bundle page, Serilog is listed as a feature. The nuget packages are there, but there is no code to configure it, just a // TODO: add logging on Startup.cs

Admin Role Example

Hi after purchasing node demo there is no admin based example there is just one file admin.gaurd.ts how should we use it also can we have a roles working example please

order is not working correctly

greetings,

I have the "ngx-admin Backend Bundle Node with e-comm"

The issue:
Order Testing:

  1. on create, the price is not submitted though I put a value. I got it as null USD.
  2. on update, it is working but Country is reset to 1st value. i.e. Afghanistan.

Also, Order filter:
3) the pagination is still showing all number of page i.e. 1,2,3,4,….
in my case the result it 2 records which can be shown on one page. seems the getCountFiltered is not working

thanks

How to recreate Corporate theme header colours from previous version?

I have registered an extra theme for my app. I want to recreate the "white text, black background" navigation header style from the previous version of the Corporate theme.

I have registered my new theme (based on Corporate) in /src/app/@theme/styles/themes.scss:

$nb-themes: nb-register-theme((
  layout-padding-top: 2.25rem,

  menu-item-icon-margin: 0 0.5rem 0 0,

  card-height-tiny: 13.5rem,
  card-height-small: 21.1875rem,
  card-height-medium: 28.875rem,
  card-height-large: 36.5625rem,
  card-height-giant: 44.25rem,
  card-margin-bottom: 1.875rem,
  card-header-with-select-padding-top: 0.5rem,
  card-header-with-select-padding-bottom: 0.5rem,

  select-min-width: 6rem,

  slide-out-background: linear-gradient(270deg, #edf1f7 0%, #e4e9f2 100%),
  slide-out-shadow-color: 0 4px 14px 0 #8f9bb3,
  slide-out-shadow-color-rtl: 0 4px 14px 0 #8f9bb3,

  header-fg: #eee,
  header-bg: #111,
), mytheme, corporate);

Which style overrides do I need to add to change the header colouring as required?

I tried some examples form the Nebular documentation (header-fg and header-bg), but it made no difference.

HTTP Auth Error while Pulling Profile Pic

Console is showing this error and reporting a 401 unauthorized while trying to pull the profile picture.

GET http://localhost:3001/api/users/5d5d9ec68a47372fa25fdb99/photo?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVkNWQ5ZWM2OGE0NzM3MmZhMjVmZGI5OSIsInJvbGUiOiJ1c2VyIiwiaWF0IjoxNTY2NDIxNzc1fQ.CJ9RWwb3ER8BPez5465jg3WO8ULDPQiqSc0q5nKM7Hs 401 (Unauthorized)

errors npm run build:prod by default

Hi,
after running the command npm run build:prod on version 3.1.2(even the previous version) we are get three errors

the first one is the following error :
ERROR in : Cannot determine the module for class SampleLayoutComponent in
(project name)/src/app/@theme/layouts/sample/sample.layout.ts! Add SampleLayoutComponent to the NgModule to fix it.
Cannot determine the module for class EvaIconsPipe in
(project name)/src/app/@theme/pipes/eva-icons.pipe.ts! Add EvaIconsPipe to the NgModule to fix it.
Cannot determine the module for class TeamComponent in
(project name)/src/app/pages/dashboard/team/team.component.ts! Add TeamComponent to the NgModule to fix it.

After adding and fixing these errors then the next error :
SampleLayoutComponent, EvaIconsPipe to theme.modules.ts and TeamComponent to dashboard.modules.ts then

second round of errors start they are from the teamcomponent

ERROR in Module build failed (from ./node_modules/sass-loader/lib/loader.js):

undefined
^
Argument $color of rgba($color, $alpha) must be a color
in(project location)\src\app\pages\dashboard\team\team.component.scss (line 29, column 32)
this gets resolved by commenting out line no 29 from the team.component.scss

third error is

ERROR in : Can't bind to 'position' since it isn't a known property of 'ngx-header'.

  1. If 'ngx-header' is an Angular component and it has 'position' input, then verify that it is part of this module.
  2. If 'ngx-header' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
  3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("ter]="layout.id === 'center-column'" windowMode>

    <ngx-header [ERROR ->][position]="sidebar.id === 'start' ? 'normal': 'inverse'">

")
: 'ngx-theme-settings' is not a known element:

  1. If 'ngx-theme-settings' is an Angular component, then verify that it is part of this module.
  2. If 'ngx-theme-settings' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("
    fixed
    [end]="sidebar.id !== 'end'">
    [ERROR ->]


    ")
    : 'ngx-toggle-settings-button' is not a known element:
  3. If 'ngx-toggle-settings-button' is an Angular component, then verify that it is part of this module.
  4. If 'ngx-toggle-settings-button' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("


    [ERROR ->]
    ")

so to solve this we need to

comment out line number 27 from sample.layout.ts

line number 58

and finally line number 61

The point of this issue is so that other can solve this problems fast ,
also for the developers of the bundle to test the code for build:prod in the future release of the bundle before release

apart from the errors there are multiple number of warnings like
WARNING: Nebular Theme: nb-theme() cannot find value for key sidebar-header-gap for theme dark
on line 59 of node_modules/@nebular/theme/styles/core/theming/_get-value.scss, in function nb-theme
from line 56 of stdin, in mixin @content
from line 116 of node_modules/@nebular/theme/styles/core/theming/_install.scss, in mixin @content
from line 97 of node_modules/@nebular/theme/styles/core/theming/_install.scss, in mixin nb-install-component-with-scss-vars
from line 115 of node_modules/@nebular/theme/styles/core/theming/_install.scss, in mixin nb-install-component
from line 11 of stdin

OAuth2 response structure

image
How can i use this response structure instead of default java backend project response structure?
image

getting jwt errors

Hi after implementing chat via socket io i am getting error of 401 unauthorized even for login so my question here is there a way to temporarily disable jwt in the backend also is there a way to test login via postman i want to test
router.post('/login', (req, res) => {
passport.authenticate('local', { session: false }, (err, user) => {
this on postman

401

OAuth login support?

I just bought the .NET Core IoT bundle, and I noticed there are 3 icons:

  • GitHub
  • Facebook
  • Twitter

Which are supposed to be OAuth support, but they are just links to the official pages. Is there a plan to actually support OAuth for those sites?

Unauthorized requests on swagger

I follow the instructions provided on the docs folder of the nestjs-angular bundle to test the api using <api_url>/swagger. First I made a POST to /api/auth/login and got a token. I then set the authorization by the button located on the top right of the page using the format Bearer <token>.

All the attempts to access locked paths on the api returned me error 401 - Unauthorized with the body:

{
  "statusCode": 401,
  "error": "Unauthorized"
}

Analyzing the post, swagger was sending on the header of my requests with the key Authentication: Bearer <my-token>. I believe the correct is Authorization: Bearer <my-token>.

I changed .addBearerAuth('Authentication', 'header') to .addBearerAuth('Authorization', 'header') on the main.ts from the backend project and got it working.

Can not start NodeJS MongoDB Starter bundle

Having followed the instructions in the enclosed INSTRUCTION.pdf file to start the back-end, I successfully ran the npm install command and edited the MongoDB connection string in config/default.js to connect to a working MongoDB server.

Upon issuing npm start, it produced the error:

'npm ERR! missing script: start'

Indeed there is no entry in the scripts node of package.json for a start script and none of the other scripts run without errors either. The PDF also refers to Angular 7.0.3, so I am wondering, is the the right PDF to go with the newest release of this bundle?

What do I need to get the unaltered bundle back-end running?

sign-out route on backend does not invalidate JWT token

I buyed the flask-starter bundle and if called the /auth/logout route from the frontend code, that makes a call to the backend route /api/auth/sign-out, we get a 401 from the backend, morever taking a look at the backend code, it doesn't invalidate the JWT token created on the loging procedure, in fact the backend code does NOTHING, just return a "200 Logged out" without doing anything more.

Another thing is that the /pages/users front-end code, to list and edit users, doesn't work either, the code is there, but unable to call it to show the users table.

Seems that the bundle is mostly incomplete or broken, no docs and just only the register/login backend source code works, the rest seems like the ngx-admin standar from the github repo.

how to run API Documentation using swagger

Greeting,

it is not clear ho to run the swagger on the documentation.
how to run api, what tool? need more clarification.

You can check API documentation by running api and accessing <api_url>/swagger/ui/index#/ link.
To use swagger with token authentication please follow these steps:
open swagger link <api_url>/swagger/ui/index#/ while running api
expand Auth controller and open POST /api/auth/login action
put correct user info into loginDto field (there is sample in swagger) and click 'try out' when received response with token, copy token (ctrl+c)
there is input 'api_key' at top right corner. Paste there token in format: 'Bearer ' and click 'Explore'
after UI was refreshed, you can try any requests, token will be added there

Thanks

I get security issue message when npm install state.

I brought "Node.js MongoDB Starter Bundle".
I follow your instruction document "ngx-admin Backend Bundle Node instruction".
I get Following Message!
found 22 vulnerabilities (12 low, 1 moderate, 9 high) in 24509 scanned packages.
I try to fix. "npm audit fix". But still this problem.
how to do that?

flask-starter bundle not working

After buying the flask-starter bundle, been unable to launch the front-end part.

After npm install without issues, the normal warnings about audit, but when try to launch npm start, got lot of messages like this one:

67% building 1963/2055 modules 92 active ...nel/charts/charts-common.component.scssWARNING: Nebular Theme: nb-theme() cannot find value for key color-danger for theme default
on line 59 of node_modules/@nebular/theme/styles/core/theming/_get-value.scss, in function nb-theme
from line 10 of stdin, in mixin @content
from line 116 of node_modules/@nebular/theme/styles/core/theming/_install.scss, in mixin @content
from line 97 of node_modules/@nebular/theme/styles/core/theming/_install.scss, in mixin nb-install-component-with-scss-vars
from line 115 of node_modules/@nebular/theme/styles/core/theming/_install.scss, in mixin nb-install-component
from line 8 of stdin

That kind of block of messages get repeating and repeating for lot of the different values, like progress-bar-background, progress-bar-warning-background, color-fg-heading, separator ... for all the themes, default, corporate, etc.

It get stuck on the npm start for a very long time, before giving a final error and not staring the front-end.

May someone point me to the right direction to fix this?.

Issues with IoT Dashboard

Hi @valentinkononov ,

Bought the IoT Dashboard bundle and found a couple of issues:

  • sign in with "[email protected]", we can see "Users" menu item, sign out and sign in with "[email protected]", we cam still see "Users" menu item. It will only go away when force refresh the page. But, when we sign in again with "[email protected]", the "Users" menu item is still NOT there.

  • User list, the table column filtering is not working. It should filter like the Smart Table sample, right? For example, if I enter "Zu" in First Name column it should show only "Zurek" in the table.

  • Security Camera list always not properly initialized, it is blank, until we click either of the two top right buttons.

Thanks.

request password issue

Greetings,

I have bought "ngx-admin Backend Bundle Node + E-comm"

for a user request to get the password
http://localhost:4200/auth/request-password

The returned URL is http://localhost:4200/#/auth/reset-password?reset_password_token=7bf2f30…..
you can see the ‘#’ casing the URL broken. If the ‘/#’ is removed, it opens the right page and then I can reset my password.

fixed need to be applied into sendResetPasswordEmail on EmailServices.js

Question: How can I send an actual email to the user?

Regards,
Mohammed

Profile editor wipes out a user's role

Currently, if you use the profile editor (/app/pages/users/user/user.component) to update a user's information, the process wipes out the user's role so that they can no longer login with their previous permission when logging in next time. Fields not included in the profile editor form need to be preserved.

Database entry for user before profile edit:

{
  "_id": "5d3076de10ec814ba0f2a898",
  "email": "[email protected]",
  "fullName": "John Smith",
  "salt": "5e375ced8b54b388",
  "passwordHash": "406983938... <snip> ...2cc52b5bf",
  "role": "admin",      <--------------------------------------------
  "address": {
    "street": "8 The Street",
    "city": "Townsville",
    "zipCode": "TO10 1AB"
  },
  "age": "25",
  "firstName": "John",
  "lastName": "Smith",
  "login": null
}

Database entry after profile edit:

{
  "_id": "5d3076de10ec814ba0f2a898",
  "email": "[email protected]",
  "fullName": "John Smith",
  "salt": "5e375ced8b54b388",
  "passwordHash": "406983938... <snip> ...2cc52b5bf",
  "role": null,        <------------------------------------------
  "address": {
    "street": "12 Letsbe Avenue",
    "city": "Cityville",
    "zipCode": "CV13 4CD"
  },
  "age": "25",
  "firstName": "John",
  "lastName": "Smith",
  "login": null
}

Wrong endpoint

Sry, don't understand how this project can work..the Rest service url for the authentication is wrong.

Example:

Angular call:
Request URL: http://localhost:3001/api/auth/login

Java endPoint:

@Controller
@RequestMapping("/auth")

/**
 * Login user
 * @param loginDTO user credentials
 * @return generated token
 */
@PostMapping("/login")
public ResponseEntity login(@Valid @RequestBody LoginDTO loginDTO) {
    Token token = authService.login(loginDTO);
    return toResponse(token);
}

the endpoint is different, the port too...

This is easily configurable and fixable, but the documentation don't say nothing about this.

Thank you

NestJS Nest can't resolve dependencies of the UserService (?, SettingsService).

When you start the APP this is the error you get, also testing with e2e will give the error too.

$ jest --config ./test/jest-e2e.json
 FAIL  test/app.e2e-spec.ts (10.787s)
  AppController (e2e)
    × / (GET) (252ms)

  ● AppController (e2e) › / (GET)

    Nest can't resolve dependencies of the UserService (?, SettingsService). Please make sure that the argument UserModel at index [0] is available in the AuthModule context.

    Potential solutions:
    - If UserModel is a provider, is it part of the current AuthModule?
    - If UserModel is exported from a separate @Module, is that module imported within AuthModule?
      @Module({
        imports: [ /* the Module containing UserModel */ ]
      })

      at Injector.lookupComponentInExports (../node_modules/@nestjs/core/injector/injector.js:185:19)
      at Injector.resolveComponentInstance (../node_modules/@nestjs/core/injector/injector.js:142:33)
      at resolveParam (../node_modules/@nestjs/core/injector/injector.js:96:38)
          at async Promise.all (index 0)
      at Injector.resolveConstructorParams (../node_modules/@nestjs/core/injector/injector.js:111:27)
      at Injector.loadInstance (../node_modules/@nestjs/core/injector/injector.js:78:9)
      at Injector.loadProvider (../node_modules/@nestjs/core/injector/injector.js:35:9)
          at async Promise.all (index 6)
      at InstanceLoader.createInstancesOfProviders (../node_modules/@nestjs/core/injector/instance-loader.js:41:9)
      at ../node_modules/@nestjs/core/injector/instance-loader.js:27:13
          at async Promise.all (index 3)
      at InstanceLoader.createInstances (../node_modules/@nestjs/core/injector/instance-loader.js:26:9)
      at InstanceLoader.createInstancesOfDependencies (../node_modules/@nestjs/core/injector/instance-loader.js:16:9)
      at TestingModuleBuilder.compile (../node_modules/@nestjs/testing/testing-module.builder.js:38:9)

● AppController (e2e) › / (GET)                                                                                                                                                                                                                                                                                                                                                               TypeError: Cannot read property 'getHttpServer' of undefined                                                                                                                                                                                                                                                                                                                                  22 |                                                                                                                                                                                          23 |   it('/ (GET)', () => {                                                                                                                                                                > 24 |     return request(app.getHttpServer())                                                                                                                                                     |                        ^                                                                                                                                                                 25 |       .get('/')                                                                                                                                                                          26 |       .expect(200)                                                                                                                                                                       27 |       .expect('Hello World!');                                                                                                                                                                                                                                                                                                                                                         at Object.<anonymous> (app.e2e-spec.ts:24:24)

How to swap layout column order when switching to RTL?

I have added i18n support to my app using ngx-translate (http://www.ngx-translate.com/). I now have my text running RTL when I choose an RTL based language. That works fine.

How do I swap the positions of the menu and content columns so that the menu swaps to the right-hand side?

I have defined the languages like this:

export const langs = [
    { code: 'en', title: 'English', rtl: false },
    { code: 'fr', title: 'Français', rtl: false },
    { code: 'de', title: 'Deutsche', rtl: false },
    { code: 'es', title: 'Español', rtl: false },
    { code: 'it', title: 'Italiano', rtl: false },
    { code: 'ja', title: '日本人', rtl: false },
    { code: 'he', title: 'עברית', rtl: true },
];

The theme's header component contains a language switching drop-down marked up as:

<nb-select (selectedChange)="changeLanguage($event)" status="primary">
    <nb-option *ngFor="let lang of langs" [value]="lang.code">{{ lang.title }}</nb-option>
</nb-select> 

and the event handling code is:

changeLanguage(lang: string) {
    this.translate.use(lang);    // call ngx-translate service to set language

    var thisLang = this.getLangByCode(lang);

    if (thisLang.rtl) {
        this.dirService.setDirection(NbLayoutDirection.RTL)
    } else {
        this.dirService.setDirection(NbLayoutDirection.LTR)
    }
}

getLangByCode(code){
    return this.langs.find(x => x.code === code);
}

What service should I import and what code do I need to add to my changeLanguage() function to move the menu to the right hand side when an RTL language is chosen?

rename frontend - backend calls

Hello,

We have bought Node.js MongoDB Starter Bundle.

We start backend and frontend like instructions declare but when we register new users does not be created in local MongoDB database.

The Instruction doc is quite bounded. Can you explain how to point to backend/local database to create users?

Thanks in advance

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.