gothinkster / node-express-realworld-example-app

3.58k stars 1.6k forks source link

Missing a few features from the new Realworld API spec. #76

Open h6w opened 5 years ago

h6w commented 5 years ago

The new postman tests at https://github.com/gothinkster/realworld/blob/master/api/Conduit.postman_collection.json are failing a few tests when run against the node-experess backend repos.

Namely:

User: 'bio' and 'image' property are missing. Article: "updatedAt" property is missing. "celeb_" test fails. At first glance, this looks like a test for emails with underlines, but I'm probably wrong.

larswww commented 4 years ago

"celeb_" test fails because the regex in the User mongoose model only allows letters and numbers!

models/User.js 12: match: [/^[a-zA-Z0-9]+$/, 'is invalid']

Changing to match: [/^[a-zA-Z0-9_]+$/, 'is invalid'] will make things run.

The bio and image features aren't implemented it seems? Is anyone working on those? I could probably get that done if not.