Skip to content
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
Use @nextcloud/axios to keep the CSRF token in sync
Signed-off-by: Christoph Wurst <[email protected]>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
  • Loading branch information
ChristophWurst authored and npmbuildbot[bot] committed Oct 15, 2019
commit 37cca6ffe78b11be08e51daf7644043fa2a513c0
6 changes: 3 additions & 3 deletions apps/accessibility/js/accessibility.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/accessibility/js/accessibility.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/accessibility/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<script>
import preview from './components/itemPreview';
import axios from 'nextcloud-axios';
import axios from '@nextcloud/axios';

export default {
name: 'Accessibility',
Expand Down
8 changes: 4 additions & 4 deletions apps/oauth2/js/oauth2.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/oauth2/js/oauth2.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/oauth2/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
</template>

<script>
import Axios from 'nextcloud-axios'
import Axios from '@nextcloud/axios'
import OAuthItem from './components/OAuthItem';

export default {
Expand Down
10 changes: 5 additions & 5 deletions apps/twofactor_backupcodes/js/settings.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/twofactor_backupcodes/js/settings.js.map

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Axios from 'nextcloud-axios'
import Axios from '@nextcloud/axios'

export function generateCodes () {
const url = OC.generateUrl('/apps/twofactor_backupcodes/settings/create');
Expand Down
28 changes: 14 additions & 14 deletions core/js/dist/login.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/js/dist/login.js.map

Large diffs are not rendered by default.

46 changes: 23 additions & 23 deletions core/js/dist/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/js/dist/main.js.map

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions core/js/dist/maintenance.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/js/dist/maintenance.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/src/components/login/ResetPassword.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
</template>

<script>
import Axios from 'nextcloud-axios'
import Axios from '@nextcloud/axios'

import {generateUrl} from '../../OC/routing'

Expand Down
2 changes: 1 addition & 1 deletion core/src/components/login/UpdatePassword.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
</template>

<script>
import Axios from 'nextcloud-axios'
import Axios from '@nextcloud/axios'

export default {
name: 'UpdatePassword',
Expand Down
2 changes: 1 addition & 1 deletion core/src/maintenance.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import Axios from 'nextcloud-axios'
import Axios from '@nextcloud/axios'

import OC from './OC/index'

Expand Down
811 changes: 445 additions & 366 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"dependencies": {
"@babel/polyfill": "^7.4.4",
"@chenfengyuan/vue-qrcode": "^1.0.1",
"@nextcloud/axios": "^0.4.2",
"@nextcloud/event-bus": "^0.2.1",
"Select2": "git+https://github.com/select2/select2.git#3.4.8",
"autosize": "^4.0.2",
Expand All @@ -42,7 +43,6 @@
"lodash": "^4.17.15",
"marked": "^0.7.0",
"moment": "^2.24.0",
"nextcloud-axios": "^0.2.1",
"nextcloud-password-confirmation": "^0.4.2",
"nextcloud-vue": "^0.12.2",
"nextcloud-vue-collections": "^0.5.6",
Expand Down
8 changes: 4 additions & 4 deletions settings/js/vue-0.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion settings/js/vue-0.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions settings/js/vue-4.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion settings/js/vue-4.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions settings/js/vue-5.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion settings/js/vue-5.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions settings/js/vue-6.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion settings/js/vue-6.js.map

Large diffs are not rendered by default.

42 changes: 21 additions & 21 deletions settings/js/vue-settings-admin-security.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion settings/js/vue-settings-admin-security.js.map

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions settings/js/vue-settings-apps-users-management.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion settings/js/vue-settings-apps-users-management.js.map

Large diffs are not rendered by default.

62 changes: 31 additions & 31 deletions settings/js/vue-settings-personal-security.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion settings/js/vue-settings-personal-security.js.map

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions settings/src/components/AdminTwoFactor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@
</template>

<script>
import Axios from 'nextcloud-axios'
import { mapState } from 'vuex'
import Axios from '@nextcloud/axios'
import {Multiselect} from 'nextcloud-vue'
import _ from 'lodash'

Expand Down
2 changes: 1 addition & 1 deletion settings/src/components/AuthTokenSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</template>

<script>
import Axios from 'nextcloud-axios';
import Axios from '@nextcloud/axios';
import confirmPassword from 'nextcloud-password-confirmation';

import AuthTokenList from './AuthTokenList';
Expand Down
12 changes: 6 additions & 6 deletions settings/src/store/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
*
*/

import axios from 'nextcloud-axios'
import confirmPassword from 'nextcloud-password-confirmation'
import axios from '@nextcloud/axios'
import confirmPassword from 'nextcloud-password-confirmation'

const sanitize = function(url) {
return url.replace(/\/$/, ''); // Remove last url slash
Expand All @@ -47,17 +47,17 @@ export default {
*
* Since Promise.then().catch().then() will always execute the last then
* this.$store.dispatch('action').then will always be executed
*
*
* If you want requireAdmin failure to also catch the API request failure
* you will need to throw a new error in the api.get.catch()
*
*
* e.g
* api.requireAdmin().then((response) => {
* api.get('url')
* .then((response) => {API success})
* .catch((error) => {throw error;});
* }).catch((error) => {requireAdmin OR API failure});
*
*
* @returns {Promise}
*/
requireAdmin() {
Expand All @@ -78,4 +78,4 @@ export default {
delete(url, data) {
return axios.delete(sanitize(url), { data: data });
}
};
};