chore(docuware_core): refs #8066 add returns
gitea/salix/pipeline/pr-master There was a failure building this commit
Details
gitea/salix/pipeline/pr-master There was a failure building this commit
Details
This commit is contained in:
parent
3c881d5e48
commit
b1b36a33a0
|
@ -56,8 +56,8 @@ module.exports = Self => {
|
|||
* @return {number} - The fileCabinet id
|
||||
*/
|
||||
Self.getDialog = async(code, action, fileCabinetId) => {
|
||||
// if (!process.env.NODE_ENV)
|
||||
// return Math.floor(Math.random() + 100);
|
||||
if (!process.env.NODE_ENV)
|
||||
return Math.floor(Math.random() + 100);
|
||||
|
||||
const docuwareInfo = await Self.app.models.Docuware.findOne({
|
||||
where: {
|
||||
|
@ -83,8 +83,8 @@ module.exports = Self => {
|
|||
* @return {number} - The fileCabinet id
|
||||
*/
|
||||
Self.getFileCabinet = async code => {
|
||||
// if (!process.env.NODE_ENV)
|
||||
// return Math.floor(Math.random() + 100);
|
||||
if (!process.env.NODE_ENV)
|
||||
return Math.floor(Math.random() + 100);
|
||||
|
||||
const options = await Self.getOptions();
|
||||
const docuwareInfo = await Self.app.models.Docuware.findOne({
|
||||
|
@ -93,7 +93,6 @@ module.exports = Self => {
|
|||
}
|
||||
});
|
||||
|
||||
console.log('options.headers: ', options.headers);
|
||||
const fileCabinetResponse = await axios.get(`${options.url}/FileCabinets`, options.headers);
|
||||
const fileCabinets = fileCabinetResponse.data.FileCabinet;
|
||||
const fileCabinetId = fileCabinets.find(fileCabinet => fileCabinet.Name === docuwareInfo.fileCabinetName).Id;
|
||||
|
@ -110,7 +109,7 @@ module.exports = Self => {
|
|||
* @return {object} - The data
|
||||
*/
|
||||
Self.get = async(code, filter, parse) => {
|
||||
// if (!process.env.NODE_ENV) return;
|
||||
if (!process.env.NODE_ENV) return;
|
||||
|
||||
const options = await Self.getOptions();
|
||||
const fileCabinetId = await Self.getFileCabinet(code);
|
||||
|
@ -133,7 +132,7 @@ module.exports = Self => {
|
|||
* @return {object} - The data
|
||||
*/
|
||||
Self.getById = async(code, id, parse) => {
|
||||
// if (!process.env.NODE_ENV) return;
|
||||
if (!process.env.NODE_ENV) return;
|
||||
|
||||
const docuwareInfo = await Self.app.models.Docuware.findOne({
|
||||
fields: ['findById'],
|
||||
|
|
Loading…
Reference in New Issue