Merged
Conversation
Inicio do projeto Labook8
Feito endpoints de signUp e createPost
Labook - Login
Conserto do erro no signUp
Login funcionando
endpoints de fazer e desfazer amizades concluído
Feed e criaçao de post consertados
amandarangel
commented
Oct 1, 2020
Author
amandarangel
left a comment
There was a problem hiding this comment.
Parabéns, pessoal!!! O trabalho de vocês ficou bem legal e vocês conseguiram trabalhar muito bem em grupo! Deixei só algumas observações no código! Estou muito feliz com o resultado que vocês apresentaram!! Continuem assim!
|
|
||
| if(!user){ | ||
| throw new Error("Usuário não existe") | ||
| } |
|
|
||
| const userRelationDatabase = new UserRelationDatabase(); | ||
| await userRelationDatabase.undoFriend(userId, undoFriendshipUserId) | ||
| await userRelationDatabase.undoFriend(undoFriendshipUserId, userId) |
Author
There was a problem hiding this comment.
Ficou repetido aqui! rs
Ahhh, uma coisa legal de fazer, tanto na hora de fazer amizade, quanto na hora de desfazer, é verificar se já existe amizade entre os dois usuários!
|
|
||
| } | ||
|
|
||
| async get(token:string){ |
Author
There was a problem hiding this comment.
O médoto com o nome apenas get no UserBusiness me faz pensar que é um método para pegar o usuário e não o feed! Vale ser um pouquinho mais específico aqui :)
| const posts: Post[] = []; | ||
|
|
||
| for (let post of result) { | ||
| posts.push(Post.toPostModel(post)); |
| } catch (error) { | ||
| res.status(400).send({ | ||
| messege: error.messege | ||
| }) |
Author
There was a problem hiding this comment.
Endpoint super bem estruturado!!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.