Guest User

Untitled

a guest
Apr 26th, 2018
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. void LoginController::login() {
  2.  
  3. QString uu = QString::fromStdString(request.getBody().toStdString());
  4. QByteArray arr = uu.toLocal8Bit();
  5.  
  6. QJsonObject doc = QJsonDocument::fromJson(arr).object();
  7.  
  8. QString username = doc.value("username").toString ();
  9.  
  10. RepositoryLinter connectFromSystem= new RepositoryLinter();
  11. Repository connectFromUser = new Repository();
  12.  
  13. qDebug("--------------------- ");
  14.  
  15.  
  16.  
  17. sid = (double)(rand())/RAND_MAX * double_t;
  18.  
  19. SessionTable.instance()->add(username, sid, userIdLinter, tablePc);
  20.  
  21. qDebug("--------------------- ");
  22.  
  23.  
  24. if (password==use) {
  25. response.setStatus(200);
  26. }
  27. else {
  28. response.setStatus(400);
  29. }
  30.  
  31. qDebug("--------------------- ");
  32.  
  33. qDebug() << "pass__:";
  34. qDebug() <<pass_;
  35. qDebug() << "content_:";
  36. qDebug() << content_;
  37.  
  38. }
Add Comment
Please, Sign In to add comment