mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2025-12-14 10:16:18 +00:00
Compare commits
3 Commits
@openstapp
...
@openstapp
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b8faae5988 | ||
| 67ab1fd613 | |||
|
|
142079bf0e |
@@ -1,5 +1,11 @@
|
|||||||
# @openstapps/backend
|
# @openstapps/backend
|
||||||
|
|
||||||
|
## 3.3.1
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- 67ab1fd6: fix for geo.point mapping
|
||||||
|
|
||||||
## 3.3.0
|
## 3.3.0
|
||||||
|
|
||||||
### Minor Changes
|
### Minor Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@openstapps/backend",
|
"name": "@openstapps/backend",
|
||||||
"description": "A reference implementation for a StApps backend",
|
"description": "A reference implementation for a StApps backend",
|
||||||
"version": "3.3.0",
|
"version": "3.3.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"license": "AGPL-3.0-only",
|
"license": "AGPL-3.0-only",
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export function buildDistanceFilter(
|
|||||||
): QueryDslSpecificQueryContainer<'geo_distance'> {
|
): QueryDslSpecificQueryContainer<'geo_distance'> {
|
||||||
const geoObject: QueryDslGeoDistanceQuery = {
|
const geoObject: QueryDslGeoDistanceQuery = {
|
||||||
distance: `${filter.arguments.distance}m`,
|
distance: `${filter.arguments.distance}m`,
|
||||||
[`${filter.arguments.field}.point.coordinates`]: {
|
[`${filter.arguments.field}.point`]: {
|
||||||
lat: filter.arguments.position[1],
|
lat: filter.arguments.position[1],
|
||||||
lon: filter.arguments.position[0],
|
lon: filter.arguments.position[0],
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export function buildDistanceSort(sort: SCDistanceSort): SortOptions {
|
|||||||
mode: 'avg',
|
mode: 'avg',
|
||||||
order: sort.order,
|
order: sort.order,
|
||||||
unit: 'm',
|
unit: 'm',
|
||||||
[`${sort.arguments.field}.point.coordinates`]: {
|
[`${sort.arguments.field}.point`]: {
|
||||||
lat: sort.arguments.position[1],
|
lat: sort.arguments.position[1],
|
||||||
lon: sort.arguments.position[0],
|
lon: sort.arguments.position[0],
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -466,7 +466,7 @@ describe('Query', function () {
|
|||||||
const expectedFilter: QueryDslSpecificQueryContainer<'geo_distance'> = {
|
const expectedFilter: QueryDslSpecificQueryContainer<'geo_distance'> = {
|
||||||
geo_distance: {
|
geo_distance: {
|
||||||
'distance': '1000m',
|
'distance': '1000m',
|
||||||
'geo.point.coordinates': {
|
'geo.point': {
|
||||||
lat: 8.123,
|
lat: 8.123,
|
||||||
lon: 50.123,
|
lon: 50.123,
|
||||||
},
|
},
|
||||||
@@ -636,7 +636,7 @@ describe('Query', function () {
|
|||||||
'mode': 'avg',
|
'mode': 'avg',
|
||||||
'order': 'desc',
|
'order': 'desc',
|
||||||
'unit': 'm',
|
'unit': 'm',
|
||||||
'geo.point.coordinates': {
|
'geo.point': {
|
||||||
lat: 50.123,
|
lat: 50.123,
|
||||||
lon: 8.123,
|
lon: 8.123,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ export const environment = {
|
|||||||
backend_url: 'https://mobile.server.uni-frankfurt.de',
|
backend_url: 'https://mobile.server.uni-frankfurt.de',
|
||||||
app_host: 'mobile.app.uni-frankfurt.de',
|
app_host: 'mobile.app.uni-frankfurt.de',
|
||||||
custom_url_scheme: 'de.anyschool.app',
|
custom_url_scheme: 'de.anyschool.app',
|
||||||
backend_version: '3.3.0',
|
backend_version: '999.0.0',
|
||||||
production: true,
|
production: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ export const environment = {
|
|||||||
backend_url: 'https://mobile.server.uni-frankfurt.de',
|
backend_url: 'https://mobile.server.uni-frankfurt.de',
|
||||||
app_host: 'mobile.app.uni-frankfurt.de',
|
app_host: 'mobile.app.uni-frankfurt.de',
|
||||||
custom_url_scheme: 'de.anyschool.app',
|
custom_url_scheme: 'de.anyschool.app',
|
||||||
backend_version: '3.3.0',
|
backend_version: '999.0.0',
|
||||||
production: false,
|
production: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -27,15 +27,7 @@ export const premaps: Record<string, MappingProperty> = {
|
|||||||
type: 'geo_shape',
|
type: 'geo_shape',
|
||||||
},
|
},
|
||||||
'Point': {
|
'Point': {
|
||||||
properties: {
|
type: 'geo_point',
|
||||||
type: {
|
|
||||||
type: 'keyword',
|
|
||||||
},
|
|
||||||
coordinates: {
|
|
||||||
type: 'geo_point',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
dynamic: 'strict',
|
|
||||||
},
|
},
|
||||||
'Polygon': {
|
'Polygon': {
|
||||||
type: 'geo_shape',
|
type: 'geo_shape',
|
||||||
|
|||||||
Reference in New Issue
Block a user