- 0.6.0 -> 0.6.1
- Candies is saved in MySQL now.
- Changed candies varchar(64 -> 1024).
This commit is contained in:
Cronick 2016-10-14 15:12:12 +02:00
parent 4fdaf71998
commit 5b9db74d12
4 changed files with 16 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{
"name": "POGOServer",
"version": "0.6.0",
"version": "0.6.1",
"description": "",
"repository": {
"type": "git",

View File

@ -55,11 +55,11 @@ export function getUserQueryData(obj) {
0, //obj.contact.sendMarketingEmails,
0, //obj.contact.sendPushNotifications,
// inventory
'{}', //obj.candyBag,
obj.candyBag.querify(), //obj.candyBag,
obj.bag.querify(), //obj.bag,
obj.avatar.querify(), //obj.avatar,
'{"0":1,"1":1,"3":1,"4":1,"7":1}', //obj.tutorial,
// WHERE
obj.email
]);
}
}

View File

@ -11,7 +11,7 @@ longitude double NULL DEFAULT NULL,
altitude double NULL DEFAULT NULL,
send_marketing_emails tinyint(1) NULL DEFAULT NULL,
send_push_notifications tinyint(1) NULL DEFAULT NULL,
candies varchar(64) NOT NULL DEFAULT '{}',
candies varchar(1024) NOT NULL DEFAULT '{}',
items varchar(255) NOT NULL DEFAULT '{}',
avatar varchar(128) NOT NULL DEFAULT '{}',
pokedex varchar(64) NOT NULL DEFAULT '{}',

View File

@ -115,6 +115,18 @@ export default class CandyBag {
return (out);
}
/**
* @return {String}
*/
querify() {
let buffer = {};
for (let key in this.candies) {
let candy = this.candies[key].amount;
buffer[key] = candy;
};
return (JSON.stringify(buffer));
}
/**
* @param {String} str
*/