Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: es interop with @nextcloud/axios #10

Merged
merged 2 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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