-
Notifications
You must be signed in to change notification settings - Fork 0
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
Url share #16
Url share #16
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Van un par de comments!! Está mergeable, charlemos sobre mis comments
res.json(await createUserChallenge(body, user)) | ||
})) | ||
|
||
router.get('/userChallenge/:sharedId', (async (req: AuthenticatedRequest, res) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Me gusta userChallenge
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Al principio no me convencía sharedId
, pero sospecho que es mejor que se llame así porque es algo que "ve" el usuario. Y que por dentro los objetos estos tengan el _id
automático que sea distinto a ese.
request().put(authenticated(`/userChallenge/1234`)) | ||
.send(userChallenge) | ||
.expect(200) | ||
.then(hasBodyProperty('sharedId')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
¿No deberían chequear que el user sea el nuevo, y el sharedId sea el del nuevo user y no el del viejo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eso es si esta lógica está en el back ¿dónde está esta lógica? Si es en el front, los tests van en el front.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { prop, getModelForClass, Severity, modelOptions, Ref } from '@typegoose/typegoose' | ||
import { User } from './user' | ||
|
||
//This is duplicated in pilas react, remember to unificar when making the monorepo :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unificar 😆
React Program-AR/pilas-bloques-app#147