command repository added and a lot of other changes

This commit is contained in:
Tobias Kurze
2019-08-13 15:30:57 +02:00
parent 6f0a2af15d
commit 55e2e9f6b9
9 changed files with 4423 additions and 4002 deletions

View File

@@ -0,0 +1,30 @@
// groupRepository.ts
// @ts-ignore
import Repository from './Repository';
const commandResource = '/command';
import {dictEmptyValToNull} from '@/utils';
export default {
getCommands() {
return Repository.get(`${commandResource}`);
},
getCommand(commandId: number) {
return Repository.get(`${commandResource}/${commandId}`);
},
deleteCommand(commandId: number) {
return Repository.delete(`${commandResource}/${commandId}`);
},
createCommand(commandData: any) {
return Repository.post(`${commandResource}`, dictEmptyValToNull(commandData));
},
updateCommand(commandId: number, commandData: any) {
return Repository.put(`${commandResource}/${commandId}`, dictEmptyValToNull(commandData));
},
};