@rivascva/dt-idl 1.1.153 → 1.1.155

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/index.d.ts CHANGED
@@ -218,7 +218,7 @@ interface components$3 {
218
218
  */
219
219
  percentChange: number;
220
220
  /**
221
- * Format: int64
221
+ * Format: double
222
222
  * @example 28000000000
223
223
  */
224
224
  marketCap: number;
@@ -266,7 +266,7 @@ interface components$3 {
266
266
  */
267
267
  averageVolume: number;
268
268
  /**
269
- * Format: int64
269
+ * Format: double
270
270
  * @example 28000000000
271
271
  */
272
272
  marketCap: number;
@@ -0,0 +1,13 @@
1
+ package middlewares
2
+
3
+ import "regexp"
4
+
5
+ // NoAuthEndpoints is a list of endpoints that do not require authentication.
6
+ var NoAuthEndpoints = []*regexp.Regexp{
7
+ regexp.MustCompile(".*/v1/users/fcm-token/.+$"),
8
+ regexp.MustCompile(".*/v1/auth/signup/firebase$"),
9
+ regexp.MustCompile(".*/v1/auth/login/firebase$"),
10
+ regexp.MustCompile(".*/v1/auth/refresh$"),
11
+ regexp.MustCompile(".*/v1/auth/logout$"),
12
+ regexp.MustCompile(".*/v1/images$"),
13
+ }
@@ -4,7 +4,6 @@ import (
4
4
  "context"
5
5
  "errors"
6
6
  "net/http"
7
- "slices"
8
7
  "strings"
9
8
 
10
9
  "github.com/RivasCVA/dt-idl/go/auth"
@@ -23,16 +22,11 @@ func GetAuthMiddleware(accessTokenSecret string) func(http.Handler) http.Handler
23
22
  return func(next http.Handler) http.Handler {
24
23
  return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
25
24
  // check if the request path is no-auth endpoint
26
- endpoints := []string{
27
- "/v1/auth/login/firebase",
28
- "/v1/auth/signup/firebase",
29
- "/v1/auth/refresh",
30
- "/v1/auth/logout",
31
- "/v1/images",
32
- }
33
- if slices.Contains(endpoints, r.URL.Path) {
34
- next.ServeHTTP(w, r)
35
- return
25
+ for _, endpoint := range NoAuthEndpoints {
26
+ if endpoint.MatchString(r.URL.Path) {
27
+ next.ServeHTTP(w, r)
28
+ return
29
+ }
36
30
  }
37
31
 
38
32
  // check if the request has a bearer authorization header
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rivascva/dt-idl",
3
- "version": "1.1.153",
3
+ "version": "1.1.155",
4
4
  "description": "Dream Trade - Interface Definition Language",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -386,9 +386,9 @@ components:
386
386
  format: double
387
387
  example: 1.25
388
388
  marketCap:
389
- type: integer
390
- format: int64
391
- example: 28000000000
389
+ type: number
390
+ format: double
391
+ example: 28000000000.00
392
392
  required:
393
393
  - symbol
394
394
  - name
@@ -435,9 +435,9 @@ components:
435
435
  format: int64
436
436
  example: 62000000
437
437
  marketCap:
438
- type: integer
439
- format: int64
440
- example: 28000000000
438
+ type: number
439
+ format: double
440
+ example: 28000000000.00
441
441
  pe:
442
442
  type: number
443
443
  format: double
@@ -217,7 +217,7 @@ export interface components {
217
217
  */
218
218
  percentChange: number;
219
219
  /**
220
- * Format: int64
220
+ * Format: double
221
221
  * @example 28000000000
222
222
  */
223
223
  marketCap: number;
@@ -265,7 +265,7 @@ export interface components {
265
265
  */
266
266
  averageVolume: number;
267
267
  /**
268
- * Format: int64
268
+ * Format: double
269
269
  * @example 28000000000
270
270
  */
271
271
  marketCap: number;