fix: add refresh after crd operation in membership contd
This commit is contained in:
@@ -49,9 +49,6 @@ export class Membership {
|
||||
async create(data) {
|
||||
try {
|
||||
const response = await http.post('/users').send(data);
|
||||
this.ctx.authentication.userData.role === "Admin"
|
||||
? await this.ctx.membership.getData()
|
||||
: await this.ctx.membership.getDataBySuperior();
|
||||
return response;
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
@@ -61,9 +58,6 @@ export class Membership {
|
||||
async update(id, data) {
|
||||
try {
|
||||
const response = await http.put('/users/' + id).send(data);
|
||||
this.ctx.authentication.userData.role === "Admin"
|
||||
? await this.ctx.membership.getData()
|
||||
: await this.ctx.membership.getDataBySuperior();
|
||||
return response;
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
@@ -73,9 +67,6 @@ export class Membership {
|
||||
async delete(id) {
|
||||
try {
|
||||
const response = await http.del('/users/' + id);
|
||||
this.ctx.authentication.userData.role === "Admin"
|
||||
? await this.ctx.membership.getData()
|
||||
: await this.ctx.membership.getDataBySuperior();
|
||||
return response;
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
|
||||
Reference in New Issue
Block a user