mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Cloud storage: enable password update
This now allows the user to set a new password for the cloud service. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
3ba3de8daf
commit
ce008f52db
3 changed files with 31 additions and 9 deletions
|
@ -988,13 +988,17 @@ CloudStorageAuthenticate::CloudStorageAuthenticate(QObject *parent) :
|
|||
#define CLOUDURL QString(prefs.cloud_base_url)
|
||||
#define CLOUDBACKENDSTORAGE CLOUDURL + "/storage"
|
||||
#define CLOUDBACKENDVERIFY CLOUDURL + "/verify"
|
||||
#define CLOUDBACKENDUPDATE CLOUDURL + "/update"
|
||||
|
||||
QNetworkReply* CloudStorageAuthenticate::authenticate(QString email, QString password, QString pin)
|
||||
QNetworkReply* CloudStorageAuthenticate::backend(QString email, QString password, QString pin, QString newpasswd)
|
||||
{
|
||||
QString payload(email + " " + password);
|
||||
QUrl requestUrl;
|
||||
if (pin == "") {
|
||||
if (pin == "" && newpasswd == "") {
|
||||
requestUrl = QUrl(CLOUDBACKENDSTORAGE);
|
||||
} else if (newpasswd != "") {
|
||||
requestUrl = QUrl(CLOUDBACKENDUPDATE);
|
||||
payload += " " + newpasswd;
|
||||
} else {
|
||||
requestUrl = QUrl(CLOUDBACKENDVERIFY);
|
||||
payload += " " + pin;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue