Add asset repository and refactor asset service (#540)

* build endpoint to get asset count by month

* Added asset repository

* Added create asset

* get asset by device ID

* Added test for existing methods

* Refactor additional endpoint

* Refactor database api to get curated locations and curated objects

* Refactor get search properties

* Fixed cookies parsing for websocket

* Added API to get asset count by time group

* Remove unused code
This commit is contained in:
Alex
2022-08-26 22:53:37 -07:00
committed by GitHub
parent 6b7c97c02a
commit f980a2f27a
33 changed files with 1321 additions and 138 deletions

View File

@@ -1,4 +1,4 @@
import { serverApi } from '@api';
import { serverApi, TimeGroupEnum } from '@api';
import * as cookieParser from 'cookie';
import type { LayoutServerLoad } from './$types';
@@ -21,6 +21,9 @@ export const load: LayoutServerLoad = async ({ request }) => {
user: userInfo
};
} catch (e) {
console.log('[ERROR] layout.server.ts [LayoutServerLoad]: ', e);
console.error('[ERROR] layout.server.ts [LayoutServerLoad]: ', e);
return {
user: undefined
};
}
};