dce-reactkit 3.2.2-beta.4 → 3.2.2-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dce-reactkit",
3
- "version": "3.2.2-beta.4",
3
+ "version": "3.2.2-beta.6",
4
4
  "description": "Shared components for Harvard DCE apps",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -1463,7 +1463,7 @@ const LogReviewer: React.FC<Props> = (props) => {
1463
1463
  // > Perform filters
1464
1464
  const logs: Log[] = [];
1465
1465
  Object.keys(logMap).forEach((year) => {
1466
- Object.keys(logMap).forEach((month) => {
1466
+ Object.keys(logMap[year]).forEach((month) => {
1467
1467
  logMap[year][month].forEach((log) => {
1468
1468
  /* ----------- Date Filter ---------- */
1469
1469
 
@@ -2,6 +2,7 @@
2
2
  import LOG_ROUTE_PATH from '../constants/LOG_ROUTE_PATH';
3
3
  import LogBuiltInMetadata from '../types/LogBuiltInMetadata';
4
4
  import LogFunction from '../types/LogFunction';
5
+ import LogLevel from '../types/LogLevel';
5
6
 
6
7
  // Import shared functions
7
8
  import visitServerEndpoint from './visitServerEndpoint';
@@ -27,6 +28,10 @@ const logClientEvent: LogFunction = async (opts) => {
27
28
  opts.subcontext
28
29
  ?? LogBuiltInMetadata.Context.Uncategorized
29
30
  ),
31
+ level: (
32
+ opts.level
33
+ ?? LogLevel.Info
34
+ ),
30
35
  tags: JSON.stringify(opts.tags ?? []),
31
36
  metadata: JSON.stringify(opts.metadata ?? {}),
32
37
  errorMessage: (
@@ -240,7 +240,7 @@ const initServer = (
240
240
  * @param {number} month the month to query (e.g. 1 = January)
241
241
  * @returns {Log[]} list of logs from the given month
242
242
  */
243
- opts.app.post(
243
+ opts.app.get(
244
244
  `${LOG_REVIEW_ROUTE_PATH_PREFIX}/years/:year/months/:month`,
245
245
  genRouteHandler({
246
246
  paramTypes: {