Skip to content

Lab5 - #2

Open
HandlessMidas wants to merge 4 commits into
masterfrom
lab5
Open

Lab5#2
HandlessMidas wants to merge 4 commits into
masterfrom
lab5

Conversation

@HandlessMidas

Copy link
Copy Markdown
Owner

No description provided.


def send(senderId: String, recieverId: String, message: String): Unit = {
val req = for {
_ <- messages += (-1, message, senderId.toInt, recieverId.toInt)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А почему у вас id всегда -1, как будет добавляться больше одного сообщения?

}

def clear(id: String): Future[Unit] = {
database.run(messages.delete).flatMap(_ => Future())

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вы тут удаляете вообще все записи, а не у конкретного пользователя

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants