Skip to content

Commit

Permalink
Merge pull request #10 from ShGKme/fix/es-interop-with-axios
Browse files Browse the repository at this point in the history
fix: es interop with @nextcloud/axios
  • Loading branch information
mejo- authored May 22, 2024
2 parents 58af09e + 8528ad3 commit 2650b3c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {getCapabilities} from '@nextcloud/capabilities';
// @ts-ignore, work around https://github.com/nextcloud-libraries/nextcloud-axios/issues/638
import {post} from '@nextcloud/axios'
import axios from '@nextcloud/axios'
import {subscribe} from '@nextcloud/event-bus'

declare global {
Expand Down Expand Up @@ -109,7 +108,7 @@ async function setupSocket(options: NotifyPushOptions = {}) {

let preAuth: string
if (!options.credentials) {
const response = await post(capabilities.notify_push.endpoints.pre_auth)
const response = await axios.post(capabilities.notify_push.endpoints.pre_auth)
preAuth = response.data
}

Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"declaration": true,
"outDir": "./dist",
"strict": true,
"esModuleInterop": true,
"lib": [
"es6",
"dom"
Expand Down

0 comments on commit 2650b3c

Please sign in to comment.