Skip to content

Commit

Permalink
change status check from ocs to response status==200
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
  • Loading branch information
andrey18106 committed Dec 4, 2023
1 parent acee134 commit f4f0c7e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/filesplugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@ if (OCA.Files && OCA.Files.fileActions) {
userId: getCurrentUser().uid,
instanceId: state.instanceId,
}).then((response) => {
if (response.data.ocs.meta.statuscode === 200) {
if (response.status === 200) {
OC.dialogs.info(t('app_api', 'Action request sent to ExApp'), t(fileAction.appid, fileAction.display_name))
} else {
console.debug(response)
OC.dialogs.info(t('app_api', 'Error while sending File action request to ExApp'), t(fileAction.appid, fileAction.display_name))
}
}).catch((error) => {
Expand Down Expand Up @@ -110,7 +111,7 @@ if (OCA.Files && OCA.Files.fileActions) {
userId: getCurrentUser().uid,
instanceId: state.instanceId,
}).then((response) => {
if (response.data.ocs.meta.statuscode === 200) {
if (response.status === 200) {
OC.dialogs.info(t('app_api', 'Action request sent to ExApp'), t(fileAction.appid, fileAction.display_name))
} else {
OC.dialogs.info(t('app_api', 'Error while sending File action request to ExApp'), t(fileAction.appid, fileAction.display_name))
Expand Down

0 comments on commit f4f0c7e

Please sign in to comment.