joshuaslate / mkrn-starter Goto Github PK
View Code? Open in Web Editor NEWRevised starter for future apps.
Revised starter for future apps.
I am testing the user endpoint without passing a Token, only a user id, but I am getting all the users or the user for that id. So if I am not logged in, I am able to access those enpoints?
Hi,
After I success install the frontend. it can be run on port 8080. Then I change to 8082. It wont change to 8082. I have tried to reclone, reinstall. Still the same. Is this because webpack save something like cache?
Josh
You have another small issue, after generating token for password reset, the new password is stored in the database in Plain Text.
I've tried to use requireRole as a middleware combined with jwtAuth (used koa-combine for combining middleware) but I get an error.
middleware must be a function not object
I also pass it like this:
requireRole(ROLES.ADMIN)
Hi Josh It sounds like a stupid question, but how do you pass the token on your GET method. In postman i am trying to pass on the header key:Authorization value:Bearer MyToken.
Sorry to send this as a ticket , even if it´s not one
Hi Josh, sorry to disturb you again,
On you PUT endpoint (/user/:id), I am passing the id on the path, the Token on the HEADER and a JSON object with the fields i want to update on the BODY.
It s giving me a 404 error and checking inside "exports.editUser" the constant safeData is always undefined because of ctx.Body is undefined too. How are you passing the fields to be updated?
Really small issue. When registering a new user the "user.js" schema does not match. I resolved by commenting out the requirement for first and last name. This is just a work in progress issue :)
ValidationError: User validation failed: name.last: Path...
name:{
type: String,
required: true
},
// name: {
// first: { type: String, required: true },
// last: { type: String, required: true },
// },
i got this
node_modules/koa-logger/index.js:36
return async function logger (ctx, next) {
^^^^^^^^
SyntaxError: Unexpected token function
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (home/mkrn-starter-master/api/index.js:3:16)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
"koa-combine-routers" @ 4.0.1 will not trigger any errors however the side-effect is all routes result in 404. I have not determined why this is however I am moving on as a KI.
npm r --save koa-combine-routers
npm i --save [email protected]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.