Skip to content

Temporary work#3

Open
ngrpv wants to merge 4 commits intomasterfrom
temporary_work
Open

Temporary work#3
ngrpv wants to merge 4 commits intomasterfrom
temporary_work

Conversation

@ngrpv
Copy link
Copy Markdown
Collaborator

@ngrpv ngrpv commented Feb 4, 2023

No description provided.

private val cardRepository: CardsRepository = CardsDAO()
private val userRepository: UserLoginInfoRepository =UserLoginInfoDAO()
fun addCard(card: CardItem): Boolean {
transaction { Card.new { namee=card.namee;title=card.title;info=card.info;contact=card.contacts;image=card.image; } }
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Я бы переименовал info, непонятно что значит

private val cardRepository: CardsRepository = CardsDAO()
private val userRepository: UserLoginInfoRepository =UserLoginInfoDAO()
fun addCard(card: CardItem): Boolean {
transaction { Card.new { namee=card.namee;title=card.title;info=card.info;contact=card.contacts;image=card.image; } }
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

можно же тут вызывать add из CardRepository



}
object cards : IntIdTable() {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

С большой буквы Cards

routing {
authorizedRouting()
unauthorizedRouting()
cardsRouting()
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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


override fun getBunchOfCards(name: String)= transaction { cards
.select(cards.namee neq name)
.limit(10).let { Card.wrapRows(it) }.toList() }
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

  1. кажется лучше лимит передавать через аргументы
  2. Почему именно по name сортируем, с названия метода не понятно, даже если метод смотреть непонятно?

{
200->
{
var a=message.body<List<Card>>()
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

называй одинаковые модели которые гуляют по хттп одинаково, что на бэке то и на фронте

Comment on lines +40 to +44
401->
{
return hashMapOf()
}
else ->{
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

одно и то же

suspend fun clientCheck(token: Token)
{
client.get("http://192.168.0.101:8888/hello"){
client.get("http://192.168.0.10:8888/hello"){
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

в конфиги



/**
* A simple [Fragment] subclass.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

комменты наверное можно убрать?

@@ -65,7 +65,7 @@ class SignUpFragment : Fragment() {
):Boolean
{
val usver=UserRegister(email,password,name, date,telegramId)
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

кто такой usver

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