Implement password change for employee profile
This commit is contained in:
26
web/api/CustomAction.js
Normal file
26
web/api/CustomAction.js
Normal file
@@ -0,0 +1,26 @@
|
||||
const axios = require('axios');
|
||||
|
||||
class CustomAction {
|
||||
constructor(adapter) {
|
||||
this.adapter = adapter;
|
||||
}
|
||||
|
||||
execute(subAction, module, request, isPost) {
|
||||
if (!isPost) {
|
||||
return axios.get(
|
||||
this.adapter.moduleRelativeURL,
|
||||
{
|
||||
params: {
|
||||
t: this.adapter.table, a: 'ca', sa: subAction, mod: module, req: request,
|
||||
},
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
return axios.post(this.moduleRelativeURL, {
|
||||
t: this.adapter.table, a: 'ca', sa: subAction, mod: module, req: request,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export default CustomAction;
|
||||
Reference in New Issue
Block a user