fix some artifact serialization trouble; fix login error

This commit is contained in:
mntmn
2018-04-15 00:23:52 +02:00
parent f396bc2e40
commit c5783feca9
8 changed files with 28 additions and 29 deletions

View File

@@ -37,7 +37,7 @@ const convertableAudioTypes = [
"application/ogg",
"audio/amr",
"audio/3ga",
"audio/wav",
"audio/wave",
"audio/3gpp",
"audio/x-wav",
"audio/aiff",
@@ -263,6 +263,8 @@ var resizeAndUploadImage = function(a, mimeType, size, fileName, fileNameOrg, im
a.h = Math.round(size.height*factor);
a.updated_at = new Date();
db.packArtifact(a);
a.save().then(function() {
fs.unlink(originalFilePath, function (err) {
if (err){
@@ -328,6 +330,8 @@ module.exports = {
a.h = Math.round(size.height*factor);
a.updated_at = new Date();
db.packArtifact(a);
a.save().then(function() {
fs.unlink(localFilePath, function (err) {
if (err){