This commit is contained in:
Wolfgang Huß 2019-06-28 17:12:14 +02:00
parent 28e4433b87
commit c81b495186
5 changed files with 9 additions and 9 deletions

View File

@ -14,7 +14,7 @@ const notify = async (postId, idsOfMentionedUsers, context) => {
await session.run(cypher, {
idsOfMentionedUsers,
createdAt,
postId
postId,
})
session.close()
}
@ -32,7 +32,7 @@ const updateHashtagsOfPost = async (postId, hashtags, context) => {
`
await session.run(cypher, {
postId,
hashtags
hashtags,
})
session.close()
}
@ -61,4 +61,4 @@ export default {
CreatePost: handleContentData,
UpdatePost: handleContentData,
},
}
}

View File

@ -1,7 +1,7 @@
import cheerio from 'cheerio'
const ID_REGEX = /\/search\/hashtag\/([\w\-.!~*'"(),]+)/g
export default function (content) {
export default function(content) {
if (!content) return []
const $ = cheerio.load(content)
const urls = $('.hashtag')
@ -18,4 +18,4 @@ export default function (content) {
}
})
return hashtags
}
}

View File

@ -1,7 +1,7 @@
import cheerio from 'cheerio'
const ID_REGEX = /\/profile\/([\w\-.!~*'"(),]+)/g
export default function (content) {
export default function(content) {
if (!content) return []
const $ = cheerio.load(content)
const urls = $('.mention')
@ -18,4 +18,4 @@ export default function (content) {
}
})
return ids
}
}

View File

@ -56,4 +56,4 @@ describe('extractIds', () => {
})
})
})
})
})

View File

@ -57,4 +57,4 @@ export default schema => {
}
return order.map(key => middlewares[key])
}
}