move event.locations to more unique event.online_locations, various fixes on insertion workflow, improved locale messages

This commit is contained in:
sedum
2023-02-22 03:11:58 +01:00
parent 3ca86b9a3b
commit cff608c06f
11 changed files with 105 additions and 102 deletions

View File

@@ -401,7 +401,7 @@ const eventController = {
multidate: body.multidate,
start_datetime: body.start_datetime,
end_datetime: body.end_datetime,
locations: body.locations,
online_locations: body.online_locations,
recurrent,
// publish this event only if authenticated
is_visible: !!req.user
@@ -486,7 +486,7 @@ const eventController = {
multidate: body.multidate,
start_datetime: body.start_datetime || event.start_datetime,
end_datetime: body.end_datetime || null,
locations: body.locations,
online_locations: body.online_locations,
recurrent
}

View File

@@ -100,7 +100,7 @@ module.exports = () => {
* @param {string} [query] - search for this string
* @param {array} [tags] - List of tags
* @param {array} [places] - List of places id
* @param {array} [locations] - List of locations
* @param {array} [online_locations] - List of online locations
* @param {integer} [max] - Limit events
* @param {boolean} [show_recurrent] - Show also recurrent events (default: as choosen in admin settings)
* @param {integer} [page] - Pagination
@@ -124,6 +124,7 @@ module.exports = () => {
* @param {string} [place_address] - the address of the place
* @param {float} [place_latitude] - the latitude of the place
* @param {float} [place_longitude] - the longitude of the place
* @param {array} online_locations - List of online locations
* @param {integer} start_datetime - start timestamp
* @param {integer} multidate - is a multidate event?
* @param {array} tags - List of tags

View File

@@ -38,7 +38,7 @@ module.exports = (sequelize, DataTypes) => {
recurrent: DataTypes.JSON,
likes: { type: DataTypes.JSON, defaultValue: [] },
boost: { type: DataTypes.JSON, defaultValue: [] },
locations: { type: DataTypes.JSON, defaultValue: [] }
online_locations: { type: DataTypes.JSON, defaultValue: [] }
})
Event.prototype.toAP = function (username, locale, to = []) {