Files
freeplanet_serverside/server/tools/server_constants.js
Paolo Arena 6a0b7db73c - Modified privacywrite query with graphLookup:
$graphLookup: {
        from: "projects",
        startWith: "$id_main_project",
        connectFromField: "id_main_project",
        connectToField: "_id",
        as: "ris",
        restrictSearchWithMatch: { $or: [{ privacyread: server_constants.Privacy.all }, { userId: userId }] }
      }
    },
    { $match: { "ris.privacyread": { $exists: true } } },
2019-04-13 03:04:49 +02:00

33 lines
525 B
JavaScript

module.exports = Object.freeze({
RIS_CODE_TODO_CREATING_NOTMYUSER: -1001,
RIS_CODE_ERR: -99,
RIS_CODE_EMAIL_ALREADY_VERIFIED: -5,
RIS_CODE_EMAIL_VERIFIED: 1,
RIS_CODE_LOGIN_ERR_GENERIC: -20,
RIS_CODE_LOGIN_ERR: -10,
RIS_CODE_OK: 1,
RIS_CODE_LOGIN_OK: 1,
RIS_CODE_HTTP_INVALID_TOKEN: 403,
LIST_END: '10000000',
LIST_START: null,
Privacy: {
all: 'all',
friends: 'friends',
mygroup: 'mygroup',
onlyme: 'onlyme'
},
TypeProj: {
TYPE_PROJECT: 1,
TYPE_SUBDIR: 2,
}
});