Skip to content
Snippets Groups Projects
Unverified Commit 02b14209 authored by Morris Jobke's avatar Morris Jobke Committed by GitHub
Browse files

Merge pull request #20868 from nextcloud/warn/js/updatenotification

Fix linter warnings for the updatenotification
parents 885163e5 0f781e35
No related branches found
No related tags found
No related merge requests found
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
...@@ -109,6 +109,7 @@ ...@@ -109,6 +109,7 @@
</template> </template>
<script> <script>
import { generateUrl, getRootUrl, generateOcsUrl } from '@nextcloud/router'
import { PopoverMenu, Multiselect } from '@nextcloud/vue' import { PopoverMenu, Multiselect } from '@nextcloud/vue'
import { VTooltip } from 'v-tooltip' import { VTooltip } from 'v-tooltip'
import ClickOutside from 'vue-click-outside' import ClickOutside from 'vue-click-outside'
...@@ -287,7 +288,7 @@ export default { ...@@ -287,7 +288,7 @@ export default {
} }
$.ajax({ $.ajax({
url: OC.linkToOCS('apps/updatenotification/api/v1/applist', 2) + this.newVersion, url: generateOcsUrl('apps/updatenotification/api/v1/applist', 2) + this.newVersion,
type: 'GET', type: 'GET',
beforeSend: function(request) { beforeSend: function(request) {
request.setRequestHeader('Accept', 'application/json') request.setRequestHeader('Accept', 'application/json')
...@@ -344,7 +345,7 @@ export default { ...@@ -344,7 +345,7 @@ export default {
}.bind(this)) }.bind(this))
$.ajax({ $.ajax({
url: OC.linkToOCS('cloud', 2) + '/groups', url: generateOcsUrl('cloud', 2) + '/groups',
dataType: 'json', dataType: 'json',
success: function(data) { success: function(data) {
const results = [] const results = []
...@@ -364,12 +365,12 @@ export default { ...@@ -364,12 +365,12 @@ export default {
*/ */
clickUpdaterButton: function() { clickUpdaterButton: function() {
$.ajax({ $.ajax({
url: OC.generateUrl('/apps/updatenotification/credentials'), url: generateUrl('/apps/updatenotification/credentials'),
}).success(function(token) { }).success(function(token) {
// create a form to send a proper post request to the updater // create a form to send a proper post request to the updater
const form = document.createElement('form') const form = document.createElement('form')
form.setAttribute('method', 'post') form.setAttribute('method', 'post')
form.setAttribute('action', OC.getRootPath() + '/updater/') form.setAttribute('action', getRootUrl() + '/updater/')
const hiddenField = document.createElement('input') const hiddenField = document.createElement('input')
hiddenField.setAttribute('type', 'hidden') hiddenField.setAttribute('type', 'hidden')
...@@ -395,7 +396,7 @@ export default { ...@@ -395,7 +396,7 @@ export default {
this.currentChannel = channel this.currentChannel = channel
$.ajax({ $.ajax({
url: OC.generateUrl('/apps/updatenotification/channel'), url: generateUrl('/apps/updatenotification/channel'),
type: 'POST', type: 'POST',
data: { data: {
'channel': this.currentChannel, 'channel': this.currentChannel,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment