mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
feat(backend): seed posts as article
This commit is contained in:
parent
738e7ad64c
commit
0dfc86f1d2
@ -165,7 +165,7 @@ Factory.define('post')
|
||||
})
|
||||
.after(async (buildObject, options) => {
|
||||
const [post, author, image, /* categories, */ tags] = await Promise.all([
|
||||
neode.create('Post', buildObject),
|
||||
neode.create('Article', buildObject),
|
||||
options.author,
|
||||
options.image,
|
||||
// options.categories,
|
||||
|
||||
@ -23,6 +23,7 @@ export function getNeode(options = {}) {
|
||||
if (!neodeInstance) {
|
||||
const { uri, username, password } = { ...defaultOptions, ...options }
|
||||
neodeInstance = new Neode(uri, username, password).with(models)
|
||||
neodeInstance.extend('Post', 'Article', {})
|
||||
return neodeInstance
|
||||
}
|
||||
return neodeInstance
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user