4108-mdb_backend #987

Merged
juan merged 9 commits from 4108-mdb_backend into dev 2022-06-02 07:33:24 +00:00
4 changed files with 6 additions and 6 deletions
Showing only changes of commit 863977915e - Show all commits

View File

@ -1,6 +1,3 @@
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`)
VALUES('MdbVersion', '*', '*', 'ALLOW', 'ROLE', 'developer');
CREATE TABLE `vn`.`mdbBranch` (
`name` VARCHAR(255),
PRIMARY KEY(`name`)
@ -12,3 +9,6 @@ CREATE TABLE `vn`.`mdbVersion` (
`version` INT,
CONSTRAINT `mdbVersion_branchFk` FOREIGN KEY (`branchFk`) REFERENCES `vn`.`mdbBranch` (`name`) ON DELETE CASCADE ON UPDATE CASCADE
);
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`)
VALUES('MdbVersion', '*', '*', 'ALLOW', 'ROLE', 'developer');

View File

@ -32,7 +32,7 @@ services:
- /mnt/appdata/pdfs:/var/lib/salix/pdfs
- /mnt/appdata/dms:/var/lib/salix/dms
- /mnt/appdata/image:/var/lib/salix/image
- /mnt/appdata/vn-access:/var/lib/salix/vn-access
- /mnt/appdata/access:/var/lib/salix/access
deploy:
replicas: ${BACK_REPLICAS:?}
placement:

View File

@ -71,7 +71,7 @@ class Controller extends Section {
}
create() {
const query = `mdbVersions/upload`;
const query = `claims/${this.claim.id}/uploadFile`;
const options = {
method: 'POST',
url: query,

View File

@ -37,7 +37,6 @@ module.exports = Self => {
Self.upload = async(ctx, appName, newVersion, branch, options) => {
const models = Self.app.models;
const myOptions = {};
console.log(ctx);
const TempContainer = models.TempContainer;
const AccessContainer = models.AccessContainer;
@ -60,6 +59,7 @@ module.exports = Self => {
return file[0];
});
const uploadedFile = files[0];
const file = await TempContainer.getFile(tempContainer.name, uploadedFile.name);
const srcFile = path.join(file.client.root, file.container, file.name);
const accessContainer = await AccessContainer.container(branch);