Commit 2f5359b1 authored by Anton's avatar Anton

Rename author to creator

parent b50d1c10
Pipeline #28467 passed with stage
in 4 minutes and 30 seconds
...@@ -14,8 +14,8 @@ const setup = async function () { ...@@ -14,8 +14,8 @@ const setup = async function () {
profiles = new Profiles(api) profiles = new Profiles(api)
// profiles.on('message', message => api._logger.debug(message)) // profiles.on('message', message => api._logger.debug(message))
const addAuthor = require('mbjs-generic-api/src/middleware/author') const addCreator = require('mbjs-generic-api/src/middleware/creator')
addAuthor(api, config) addCreator(api, config)
/** /**
* Configure resources * Configure resources
......
...@@ -91,8 +91,8 @@ module.exports.setupArchives = (api, mapService, annotationService, cellService) ...@@ -91,8 +91,8 @@ module.exports.setupArchives = (api, mapService, annotationService, cellService)
map.id = undefined map.id = undefined
map._uuid = undefined map._uuid = undefined
} }
if (!map.author) { if (!map.creator) {
map.author = { map.creator = {
id: req.user.uuid, id: req.user.uuid,
name: req.user.profile.name name: req.user.profile.name
} }
...@@ -115,8 +115,8 @@ module.exports.setupArchives = (api, mapService, annotationService, cellService) ...@@ -115,8 +115,8 @@ module.exports.setupArchives = (api, mapService, annotationService, cellService)
annotation._uuid = undefined annotation._uuid = undefined
annotation.id = undefined annotation.id = undefined
} }
if (!annotation.author) { if (!annotation.creator) {
annotation.author = { annotation.creator = {
id: req.user.uuid, id: req.user.uuid,
name: req.user.profile.name name: req.user.profile.name
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment