@dracul/audit-frontend 1.23.2 → 1.23.10

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": "@dracul/audit-frontend",
3
- "version": "1.23.2",
3
+ "version": "1.23.10",
4
4
  "description": "Audit frontend",
5
5
  "author": "Cristian Incarnato <cristian.cdi@gmail.com>",
6
6
  "scripts": {
@@ -66,5 +66,5 @@
66
66
  "type": "git",
67
67
  "url": "git+https://github.com/draculjs/modular-framework.git"
68
68
  },
69
- "gitHead": "bff6d1984e6222842ffef950324b3eb322de760a"
69
+ "gitHead": "c89409740944808db415bf91d7417ef16a88b921"
70
70
  }
@@ -151,6 +151,8 @@
151
151
  }).catch(err => {
152
152
  console.error(err)
153
153
  }).finally(() => this.loading = false)
154
+
155
+ AuditProvider.createAudit('Testing', 'audit module', 'just a test for a new service')
154
156
  },
155
157
  setFilters(auditFilters) {
156
158
  console.log('auditFilters', auditFilters)
@@ -41,6 +41,14 @@ class AuditProvider {
41
41
  })
42
42
  }
43
43
 
44
+ createAudit(action, resource, description){
45
+ return this.getGraphqlClient().mutate({
46
+ mutation: require('./gql/Audit/createAudit.graphql'),
47
+ variables: {action, resource, description},
48
+ fetchPolicy: "no-cache"
49
+ })
50
+ }
51
+
44
52
  }
45
53
 
46
54
  export default new AuditProvider()
@@ -0,0 +1,12 @@
1
+ mutation createAudit($action: String!, $resource: String!, $description: String){
2
+ createAudit(action: $action, resource: $resource, description: $description){
3
+ id
4
+ user{
5
+ id
6
+ username
7
+ }
8
+ action
9
+ resource
10
+ }
11
+ }
12
+