@internetderdinge/api 1.229.7 → 1.229.8

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/dist/src/index.js CHANGED
@@ -6,6 +6,7 @@ export { errorConverter, errorHandler } from "../src/middlewares/error";
6
6
  export { default as validate } from "../src/middlewares/validate";
7
7
  export { validateDevice, validateDeviceIsInOrganization, validateDeviceOrOrganizationQuery, validateDeviceQuery, } from "../src/middlewares/validateDevice";
8
8
  export { initI18n } from "../src/i18n/i18n";
9
+ export { default as i18n } from "../src/i18n/i18n";
9
10
  export { default as usersRoute } from "../src/users/users.route";
10
11
  export { default as accountsRoute } from "../src/accounts/accounts.route";
11
12
  export { default as accountsService } from "../src/accounts/accounts.service";
@@ -20,10 +20,8 @@ const verifyCallback = (req, resolve, reject, requiredRights) => async (err, use
20
20
  resolve();
21
21
  };
22
22
  const auth = function authFactory(...requiredRights) {
23
- console.log("Creating auth middleware with required rights:", requiredRights);
24
23
  return async function authMiddleware(req, res, next) {
25
24
  try {
26
- console.log("Authenticating request:");
27
25
  // Check for custom token in X-API-Key header
28
26
  const apiKey = req.headers["x-api-key"];
29
27
  if (apiKey && apiKey.length === 64) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@internetderdinge/api",
3
- "version": "1.229.7",
3
+ "version": "1.229.8",
4
4
  "description": "Shared OpenIoT API modules",
5
5
  "main": "dist/src/index.js",
6
6
  "type": "module",
package/src/index.ts CHANGED
@@ -11,6 +11,7 @@ export {
11
11
  validateDeviceQuery,
12
12
  } from "../src/middlewares/validateDevice";
13
13
  export { initI18n } from "../src/i18n/i18n";
14
+ export { default as i18n } from "../src/i18n/i18n";
14
15
  export { default as usersRoute } from "../src/users/users.route";
15
16
  export { default as accountsRoute } from "../src/accounts/accounts.route";
16
17
  export { default as accountsService } from "../src/accounts/accounts.service";
@@ -40,14 +40,12 @@ const verifyCallback: VerifyCallback =
40
40
  };
41
41
 
42
42
  const auth = function authFactory(...requiredRights: string[]) {
43
- console.log("Creating auth middleware with required rights:", requiredRights);
44
43
  return async function authMiddleware(
45
44
  req: AuthRequest,
46
45
  res: Response,
47
46
  next: NextFunction,
48
47
  ): Promise<void> {
49
48
  try {
50
- console.log("Authenticating request:");
51
49
  // Check for custom token in X-API-Key header
52
50
  const apiKey = req.headers["x-api-key"] as string | undefined;
53
51
  if (apiKey && apiKey.length === 64) {