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(dav): remove unused userId param of some ocs routes #42036

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 2 additions & 2 deletions apps/dav/appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
['name' => 'direct#getUrl', 'url' => '/api/v1/direct', 'verb' => 'POST'],
['name' => 'out_of_office#getCurrentOutOfOfficeData', 'url' => '/api/v1/outOfOffice/{userId}/now', 'verb' => 'GET'],
['name' => 'out_of_office#getOutOfOffice', 'url' => '/api/v1/outOfOffice/{userId}', 'verb' => 'GET'],
['name' => 'out_of_office#setOutOfOffice', 'url' => '/api/v1/outOfOffice/{userId}', 'verb' => 'POST'],
['name' => 'out_of_office#clearOutOfOffice', 'url' => '/api/v1/outOfOffice/{userId}', 'verb' => 'DELETE'],
['name' => 'out_of_office#setOutOfOffice', 'url' => '/api/v1/outOfOffice', 'verb' => 'POST'],
['name' => 'out_of_office#clearOutOfOffice', 'url' => '/api/v1/outOfOffice', 'verb' => 'DELETE'],
],
];
20 changes: 3 additions & 17 deletions apps/dav/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,9 @@
}
}
}
},
}
},
"/ocs/v2.php/apps/dav/api/v1/outOfOffice": {
"post": {
"operationId": "out_of_office-set-out-of-office",
"summary": "Set out-of-office absence",
Expand Down Expand Up @@ -515,14 +517,6 @@
"type": "string"
}
},
{
"name": "userId",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "OCS-APIRequest",
"in": "header",
Expand Down Expand Up @@ -653,14 +647,6 @@
}
],
"parameters": [
{
"name": "userId",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "OCS-APIRequest",
"in": "header",
Expand Down
5 changes: 2 additions & 3 deletions apps/dav/src/components/AbsenceForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ import NcTextField from '@nextcloud/vue/dist/Components/NcTextField.js'
import NcTextArea from '@nextcloud/vue/dist/Components/NcTextArea.js'
import NcDateTimePickerNative from '@nextcloud/vue/dist/Components/NcDateTimePickerNative.js'
import { generateOcsUrl } from '@nextcloud/router'
import { getCurrentUser } from '@nextcloud/auth'
import axios from '@nextcloud/axios'
import { formatDateAsYMD } from '../utils/date.js'
import { loadState } from '@nextcloud/initial-state'
Expand Down Expand Up @@ -117,7 +116,7 @@ export default {

this.loading = true
try {
await axios.post(generateOcsUrl('/apps/dav/api/v1/outOfOffice/{userId}', { userId: getCurrentUser().uid }), {
st3iny marked this conversation as resolved.
Show resolved Hide resolved
await axios.post(generateOcsUrl('/apps/dav/api/v1/outOfOffice'), {
firstDay: formatDateAsYMD(this.firstDay),
lastDay: formatDateAsYMD(this.lastDay),
status: this.status,
Expand All @@ -134,7 +133,7 @@ export default {
async clearAbsence() {
this.loading = true
try {
await axios.delete(generateOcsUrl('/apps/dav/api/v1/outOfOffice/{userId}', { userId: getCurrentUser().uid }))
await axios.delete(generateOcsUrl('/apps/dav/api/v1/outOfOffice'))
this.resetForm()
showSuccess(this.$t('dav', 'Absence cleared'))
} catch (error) {
Expand Down
4 changes: 2 additions & 2 deletions dist/dav-settings-personal-availability.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/dav-settings-personal-availability.js.map

Large diffs are not rendered by default.

Loading