@enso-ui/users 2.0.14 → 2.0.15

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": "@enso-ui/users",
3
- "version": "2.0.14",
3
+ "version": "2.0.15",
4
4
  "description": "Basic users package",
5
5
  "main": "bulma/index.js",
6
6
  "scripts": {
@@ -145,7 +145,10 @@ export default {
145
145
  Tokens,
146
146
  },
147
147
 
148
- inject: ['i18n', 'canAccess', 'errorHandler', 'route', 'routerErrorHandler', 'toastr'],
148
+ inject: [
149
+ 'http', 'i18n', 'canAccess', 'errorHandler', 'route',
150
+ 'routerErrorHandler', 'toastr'
151
+ ],
149
152
 
150
153
  emits: ['update'],
151
154
 
@@ -178,7 +181,7 @@ export default {
178
181
  .catch(this.routerErrorHandler));
179
182
  },
180
183
  resetPassword() {
181
- axios.post(this.route('administration.users.resetPassword', this.$route.params))
184
+ this.http.post(this.route('administration.users.resetPassword', this.$route.params))
182
185
  .then(({ data }) => this.toastr.success(data.message))
183
186
  .catch(this.errorHandler);
184
187
  },
@@ -41,7 +41,7 @@ export default {
41
41
 
42
42
  directives: { focus },
43
43
 
44
- inject: ['i18n', 'errorHandler', 'route'],
44
+ inject: ['http', 'i18n', 'errorHandler', 'route'],
45
45
 
46
46
  props: {
47
47
  userId: {
@@ -54,7 +54,7 @@ export default {
54
54
 
55
55
  methods: {
56
56
  destroy(person = false) {
57
- axios.delete(this.route('administration.users.destroy', this.userId),
57
+ this.http.delete(this.route('administration.users.destroy', this.userId),
58
58
  { params: { person: !!person } })
59
59
  .then(({ data }) => this.$emit('destroyed', data))
60
60
  .catch(this.errorHandler);
@@ -49,7 +49,7 @@ library.add(faPlus, faSync, faSearch);
49
49
  export default {
50
50
  name: 'Sessions',
51
51
 
52
- inject: ['canAccess', 'errorHandler', 'i18n', 'route', 'toastr'],
52
+ inject: ['canAccess', 'errorHandler', 'http', 'i18n', 'route', 'toastr'],
53
53
 
54
54
  components: { Fa, Session },
55
55
 
@@ -89,14 +89,14 @@ export default {
89
89
 
90
90
  methods: {
91
91
  fetch() {
92
- axios.get(this.route('administration.users.sessions.index', this.$route.params))
92
+ this.http.get(this.route('administration.users.sessions.index', this.$route.params))
93
93
  .then(({ data }) => {
94
94
  this.sessions = data;
95
95
  this.$emit('update');
96
96
  }).catch(this.errorHandler);
97
97
  },
98
98
  destroy({ id }, index) {
99
- axios.delete(
99
+ this.http.delete(
100
100
  this.route('administration.users.sessions.destroy', this.$route.params),
101
101
  { params: { id } },
102
102
  ).then(({ data }) => {
@@ -71,7 +71,7 @@ library.add(faPlus, faSync, faSearch);
71
71
  export default {
72
72
  name: 'Tokens',
73
73
 
74
- inject: ['canAccess', 'errorHandler', 'i18n', 'route', 'toastr'],
74
+ inject: ['canAccess', 'errorHandler', 'http', 'i18n', 'route', 'toastr'],
75
75
 
76
76
  components: {
77
77
  Fa,
@@ -121,14 +121,14 @@ export default {
121
121
 
122
122
  methods: {
123
123
  fetch() {
124
- axios.get(this.route('administration.users.tokens.index', this.$route.params))
124
+ this.http.get(this.route('administration.users.tokens.index', this.$route.params))
125
125
  .then(({ data }) => {
126
126
  this.tokens = data;
127
127
  this.$emit('update');
128
128
  }).catch(this.errorHandler);
129
129
  },
130
130
  destroy({ id }, index) {
131
- axios.delete(
131
+ this.http.delete(
132
132
  this.route('administration.users.tokens.destroy', this.$route.params),
133
133
  { params: { id } },
134
134
  ).then(({ data }) => {
@@ -169,7 +169,10 @@ export default {
169
169
 
170
170
  components: { Divider, Fa, Uploader },
171
171
 
172
- inject: ['canAccess', 'errorHandler', 'i18n', 'route', 'routerErrorHandler'],
172
+ inject: [
173
+ 'canAccess', 'errorHandler', 'http', 'i18n',
174
+ 'route', 'routerErrorHandler'
175
+ ],
173
176
 
174
177
  emits: ['start-impersonating'],
175
178
 
@@ -206,7 +209,7 @@ export default {
206
209
  : null;
207
210
  },
208
211
  fetch() {
209
- axios.get(this.route(this.$route.name, this.$route.params.user))
212
+ this.http.get(this.route(this.$route.name, this.$route.params.user))
210
213
  .then(response => (this.profile = response.data.user))
211
214
  .catch(this.errorHandler);
212
215
  },
@@ -214,7 +217,7 @@ export default {
214
217
  eventBus.$emit('start-impersonating', this.profile.id);
215
218
  },
216
219
  updateAvatar() {
217
- axios.patch(this.route('core.avatars.update', this.user.avatar.id))
220
+ this.http.patch(this.route('core.avatars.update', this.user.avatar.id))
218
221
  .then(({ data }) => this.setUserAvatar(data.avatarId))
219
222
  .catch(this.errorHandler);
220
223
  },