fixed importing of urls - remove url prefix

This commit is contained in:
Ulf Gebhardt 2019-06-14 14:03:21 +02:00
parent fa5b16ddd5
commit d024d7df91
No known key found for this signature in database
GPG Key ID: 44C888923CC8E7F3
3 changed files with 8 additions and 8 deletions

View File

@ -45,7 +45,7 @@ MERGE(b:Badge {id: badge._id["$oid"]})
ON CREATE SET ON CREATE SET
b.key = badge.key, b.key = badge.key,
b.type = badge.type, b.type = badge.type,
b.icon = badge.image.path, b.icon = substring(badge.image.path, 38),
b.status = badge.status, b.status = badge.status,
b.createdAt = badge.createdAt.`$date`, b.createdAt = badge.createdAt.`$date`,
b.updatedAt = badge.updatedAt.`$date` b.updatedAt = badge.updatedAt.`$date`

View File

@ -28,7 +28,7 @@
[?] unique: true, // Unique value is not enforced in Nitro? [?] unique: true, // Unique value is not enforced in Nitro?
[-] index: true [-] index: true
}, },
[ ] type: { [ ] type: { // db.getCollection('contributions').distinct('type') -> 'DELETED', 'cando', 'post'
[ ] type: String, [ ] type: String,
[ ] required: true, [ ] required: true,
[-] index: true [-] index: true
@ -50,7 +50,7 @@
[?] required: true // Not required in Nitro [?] required: true // Not required in Nitro
}, },
[ ] hasMore: { type: Boolean }, [ ] hasMore: { type: Boolean },
[?] teaserImg: { type: String }, // Path is incorrect in Nitro [X] teaserImg: { type: String },
[ ] language: { [ ] language: {
[ ] type: String, [ ] type: String,
[ ] required: true, [ ] required: true,
@ -131,7 +131,7 @@ MERGE (p:Post {id: post._id["$oid"]})
ON CREATE SET ON CREATE SET
p.title = post.title, p.title = post.title,
p.slug = post.slug, p.slug = post.slug,
p.image = post.teaserImg, p.image = substring(post.teaserImg, 38),
p.content = post.content, p.content = post.content,
p.contentExcerpt = post.contentExcerpt, p.contentExcerpt = post.contentExcerpt,
p.visibility = toLower(post.visibility), p.visibility = toLower(post.visibility),

View File

@ -49,8 +49,8 @@
} }
}, },
[ ] timezone: { type: String }, [ ] timezone: { type: String },
[?] avatar: { type: String }, // Path is incorrect in Nitro [X] avatar: { type: String },
[?] coverImg: { type: String }, // Path is incorrect in Nitro, was not modeled in latest Nitro - do we want this? [X] coverImg: { type: String },
[ ] doiToken: { type: String }, [ ] doiToken: { type: String },
[ ] confirmedAt: { type: Date }, [ ] confirmedAt: { type: Date },
[?] badgeIds: [], // Verify this is working properly [?] badgeIds: [], // Verify this is working properly
@ -102,8 +102,8 @@ u.name = user.name,
u.slug = user.slug, u.slug = user.slug,
u.email = user.email, u.email = user.email,
u.password = user.password, u.password = user.password,
u.avatar = user.avatar, u.avatar = substring(user.avatar, 38),
u.coverImg = user.coverImg, u.coverImg = substring(user.coverImg, 38),
u.wasInvited = user.wasInvited, u.wasInvited = user.wasInvited,
u.wasSeeded = user.wasSeeded, u.wasSeeded = user.wasSeeded,
u.role = toLower(user.role), u.role = toLower(user.role),