Commit a3fbdafd authored by anton's avatar anton
Browse files

Update id field

parent dc6f2553
Pipeline #163835 passed with stage
in 52 seconds
......@@ -11,10 +11,9 @@ module.exports = function (app) {
const mongooseClient = app.get('mongooseClient')
const { Schema } = mongooseClient
const schema = new Schema({
_id: {
id: {
type: String,
default: () => `${constants.BASE_URI}annotations/${v4()}`,
alias: 'id'
default: () => `${constants.BASE_URI}annotations/${v4()}`
},
'@context': {
type: String,
......
......@@ -10,10 +10,9 @@ module.exports = function (app) {
const { Schema } = mongooseClient
const schema = new Schema({
/** Document ID & ownership **/
_id: {
id: {
type: String,
default: () => `${constants.BASE_URI}maps/${v4()}`,
alias: 'id'
default: () => `${constants.BASE_URI}maps/${v4()}`
},
'@context': {
type: String,
......
......@@ -6,10 +6,9 @@ module.exports = function (app) {
const modelName = 'users'
const mongooseClient = app.get('mongooseClient')
const schema = new mongooseClient.Schema({
_id: {
id: {
type: String,
default: () => `${constants.BASE_URI}users/${v4()}`,
alias: 'id'
default: () => `${constants.BASE_URI}users/${v4()}`
},
email: { type: String, lowercase: true },
......
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