Add creator

This commit is contained in:
2022-01-07 00:27:14 +02:00
parent 129ce8cbc6
commit 0d0468e45c
5 changed files with 14 additions and 0 deletions

View File

@@ -80,6 +80,7 @@ module.exports = function (options) {
})
.post(function(request, response, next) {
db.Project.create({
creatorId: request.user.id,
name: request.body.name,
description: request.body.description,
entityId: request.user.individualEntityUser.entityUser.entityId
@@ -175,6 +176,7 @@ module.exports = function (options) {
if (artifactVersion) {
const projectArtifactVersion = db.ProjectArtifactVersion.create({
creatorId: request.user.id,
projectId: project.id,
artifactVersionId: artifactVersion.id
})
@@ -260,6 +262,7 @@ module.exports = function (options) {
if (translationArtifactVersion) {
const projectTranslationArtifactVersion = db.ProjectTranslationArtifactVersion.create({
creatorId: request.user.id,
projectId: project.id,
translationArtifactVersionId: translationArtifactVersion.id
})
@@ -407,6 +410,7 @@ module.exports = function (options) {
}
})
const campaign = await db.Campaign.create({
creatorId: request.user.id,
name: request.body.name,
description: request.body.description,
// defaultSatoshis: [request.body.satoshis].flat()[0],