4108-mdb_backend #987
|
@ -1,6 +1,3 @@
|
||||||
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`)
|
|
||||||
VALUES('MdbVersion', '*', '*', 'ALLOW', 'ROLE', 'developer');
|
|
||||||
|
|
||||||
CREATE TABLE `vn`.`mdbBranch` (
|
CREATE TABLE `vn`.`mdbBranch` (
|
||||||
`name` VARCHAR(255),
|
`name` VARCHAR(255),
|
||||||
PRIMARY KEY(`name`)
|
PRIMARY KEY(`name`)
|
||||||
|
@ -12,3 +9,6 @@ CREATE TABLE `vn`.`mdbVersion` (
|
||||||
`version` INT,
|
`version` INT,
|
||||||
CONSTRAINT `mdbVersion_branchFk` FOREIGN KEY (`branchFk`) REFERENCES `vn`.`mdbBranch` (`name`) ON DELETE CASCADE ON UPDATE CASCADE
|
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');
|
||||||
|
|
|
@ -32,7 +32,7 @@ services:
|
||||||
- /mnt/appdata/pdfs:/var/lib/salix/pdfs
|
- /mnt/appdata/pdfs:/var/lib/salix/pdfs
|
||||||
- /mnt/appdata/dms:/var/lib/salix/dms
|
- /mnt/appdata/dms:/var/lib/salix/dms
|
||||||
- /mnt/appdata/image:/var/lib/salix/image
|
- /mnt/appdata/image:/var/lib/salix/image
|
||||||
- /mnt/appdata/vn-access:/var/lib/salix/vn-access
|
- /mnt/appdata/access:/var/lib/salix/access
|
||||||
deploy:
|
deploy:
|
||||||
replicas: ${BACK_REPLICAS:?}
|
replicas: ${BACK_REPLICAS:?}
|
||||||
placement:
|
placement:
|
||||||
|
|
|
@ -71,7 +71,7 @@ class Controller extends Section {
|
||||||
}
|
}
|
||||||
|
|
||||||
create() {
|
create() {
|
||||||
const query = `mdbVersions/upload`;
|
const query = `claims/${this.claim.id}/uploadFile`;
|
||||||
const options = {
|
const options = {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
url: query,
|
url: query,
|
||||||
|
|
|
@ -37,7 +37,6 @@ module.exports = Self => {
|
||||||
Self.upload = async(ctx, appName, newVersion, branch, options) => {
|
Self.upload = async(ctx, appName, newVersion, branch, options) => {
|
||||||
const models = Self.app.models;
|
const models = Self.app.models;
|
||||||
const myOptions = {};
|
const myOptions = {};
|
||||||
console.log(ctx);
|
|
||||||
|
|
||||||
const TempContainer = models.TempContainer;
|
const TempContainer = models.TempContainer;
|
||||||
const AccessContainer = models.AccessContainer;
|
const AccessContainer = models.AccessContainer;
|
||||||
|
@ -60,6 +59,7 @@ module.exports = Self => {
|
||||||
return file[0];
|
return file[0];
|
||||||
});
|
});
|
||||||
const uploadedFile = files[0];
|
const uploadedFile = files[0];
|
||||||
|
|
||||||
const file = await TempContainer.getFile(tempContainer.name, uploadedFile.name);
|
const file = await TempContainer.getFile(tempContainer.name, uploadedFile.name);
|
||||||
const srcFile = path.join(file.client.root, file.container, file.name);
|
const srcFile = path.join(file.client.root, file.container, file.name);
|
||||||
const accessContainer = await AccessContainer.container(branch);
|
const accessContainer = await AccessContainer.container(branch);
|
||||||
|
|
Loading…
Reference in New Issue