fixed issue #12

This commit is contained in:
imfunny 2019-05-13 09:40:24 +05:30 committed by GitHub
parent 24c982c55e
commit eea39f7b56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 15 deletions

View File

@ -18,13 +18,13 @@ function populateCSS(){
if (err) throw err;
fs.appendFile('index.css', dark, function (err) {
if (err) throw err;
fs.readFile("config.json", function (err , data) {
if (err) throw err;
data = JSON.parse(data);
data[0].theme = "dark";
fs.writeFile('config.json', JSON.stringify(data, null, ' '), function(err){
if (err) throw err;
});
});
fs.readFile("config.json", function (err , data) {
if (err) throw err;
data = JSON.parse(data);
data[0].theme = "dark";
fs.writeFile('config.json', JSON.stringify(data, null, ' '), function(err){
if (err) throw err;
});
});
});
@ -33,13 +33,13 @@ function populateCSS(){
if (err) throw err;
fs.appendFile('index.css', light, function (err) {
if (err) throw err;
fs.readFile("config.json", function (err , data) {
if (err) throw err;
data = JSON.parse(data);
data[0].theme = "light";
fs.writeFile('config.json', JSON.stringify(data, null, ' '), function(err){
if (err) throw err;
});
});
fs.readFile("config.json", function (error , data) {
if (error) throw err;
data = JSON.parse(data);
data[0].theme = "light";
fs.writeFile('config.json', JSON.stringify(data, null, ' '), function(error){
if (error) throw err;
});
});
});

View File

@ -3,7 +3,7 @@
"username": null,
"name": null,
"userimg": null,
"background": null,
"background": "https://images.unsplash.com/photo-1553748024-d1b27fb3f960?w=1450",
"theme": "light"
}
]