@rivascva/dt-idl 1.1.88 → 1.1.90

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/go/auth/utils.go CHANGED
@@ -8,8 +8,8 @@ import (
8
8
  "github.com/RivasCVA/dt-idl/go/utils"
9
9
  )
10
10
 
11
- // CanActorAccessUserId checks if the actor is allowed to access data for the user id.
12
- func CanActorAccessUserId(ctx context.Context, userId string) (bool, error) {
11
+ // CanActorAccessResourcesForUser checks if the actor is allowed to access resources for the user.
12
+ func CanActorAccessResourcesForUser(ctx context.Context, userId string) (bool, error) {
13
13
  // get the actor id from the context
14
14
  actorId, err := utils.GetActorIdFromContext(ctx)
15
15
  if err != nil {
@@ -0,0 +1,10 @@
1
+ package utils
2
+
3
+ // SliceMap applies a function to each element of a slice and returns the results as a new slice.
4
+ func SliceMap[T any, U any](s []T, f func(T) U) []U {
5
+ result := make([]U, len(s))
6
+ for i, v := range s {
7
+ result[i] = f(v)
8
+ }
9
+ return result
10
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rivascva/dt-idl",
3
- "version": "1.1.88",
3
+ "version": "1.1.90",
4
4
  "description": "Dream Trade - Interface Definition Language",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",