mirror of
https://github.com/nextcloud/server.git
synced 2026-03-18 00:23:20 -04:00
refactor(OC): migrate request token handling to Typescript
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
parent
0450ce9ed4
commit
84ab0dc97e
7 changed files with 6 additions and 6 deletions
|
|
@ -7,7 +7,7 @@
|
|||
/* eslint-disable */
|
||||
import $ from 'jquery'
|
||||
|
||||
import { getToken } from './requesttoken.js'
|
||||
import { getToken } from './requesttoken.ts'
|
||||
|
||||
/**
|
||||
* Create a new event source
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ import {
|
|||
} from './host.js'
|
||||
import {
|
||||
getToken as getRequestToken,
|
||||
} from './requesttoken.js'
|
||||
} from './requesttoken.ts'
|
||||
import {
|
||||
hideMenus,
|
||||
registerMenu,
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import 'strengthify/strengthify.css'
|
|||
import OC from './OC/index.js'
|
||||
import OCP from './OCP/index.js'
|
||||
import OCA from './OCA/index.js'
|
||||
import { getToken as getRequestToken } from './OC/requesttoken.js'
|
||||
import { getToken as getRequestToken } from './OC/requesttoken.ts'
|
||||
|
||||
const warnIfNotTesting = function() {
|
||||
if (window.TESTING === undefined) {
|
||||
|
|
|
|||
2
core/src/jquery/requesttoken.js
vendored
2
core/src/jquery/requesttoken.js
vendored
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
import $ from 'jquery'
|
||||
|
||||
import { getToken } from '../OC/requesttoken.js'
|
||||
import { getToken } from '../OC/requesttoken.ts'
|
||||
|
||||
$(document).on('ajaxSend', function(elm, xhr, settings) {
|
||||
if (settings.crossDomain === false) {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import { getCurrentUser } from '@nextcloud/auth'
|
|||
import { generateUrl } from '@nextcloud/router'
|
||||
|
||||
import OC from './OC/index.js'
|
||||
import { setToken as setRequestToken, getToken as getRequestToken } from './OC/requesttoken.js'
|
||||
import { setToken as setRequestToken, getToken as getRequestToken } from './OC/requesttoken.ts'
|
||||
|
||||
let config = null
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
*/
|
||||
|
||||
import { beforeEach, describe, expect, test, vi } from 'vitest'
|
||||
import { manageToken, setToken } from '../../OC/requesttoken.js'
|
||||
import { manageToken, setToken } from '../../OC/requesttoken.ts'
|
||||
|
||||
const eventbus = vi.hoisted(() => ({ emit: vi.fn() }))
|
||||
vi.mock('@nextcloud/event-bus', () => eventbus)
|
||||
|
|
|
|||
Loading…
Reference in a new issue