No OCS message when updating a share

未关闭 适合新手
#37,653 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
68/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
php
领域
api

调研方向

从 OCS 的 PUT shares 端点的 share-update 入口开始,检查 API 测试;这些测试目前没有一致地断言响应消息。确认成功更新会返回 OK,然后在相关的 API 测试中为此响应添加覆盖。

由索引模型根据 Issue 内容生成。

描述

discussion Type:Bug

Request:

PUT /owncloud-core/ocs/v1.php/apps/files_sharing/api/v1/shares/391 HTTP/1.1
Host: localhost
User-Agent: GuzzleHttp/6.5.4 curl/7.68.0 PHP/7.3.19-1+ubuntu20.04.1+deb.sury.org+1
Authorization: Basic QWxpY2U6MTIzNDU2
OCS-APIREQUEST: 1
Content-Type: application/x-www-form-urlencoded
Content-Length: 14

permissions=31

Response:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message/>
  <totalitems></totalitems>
  <itemsperpage></itemsperpage>
 </meta>
 <data>
  <id>391</id>
  <share_type>0</share_type>
  <uid_owner>Alice</uid_owner>
  <displayname_owner>Alice Hansen</displayname_owner>
  <permissions>31</permissions>
  <stime>1594023692</stime>
  <parent/>
  <expiration/>
  <token/>
  <uid_file_owner>Alice</uid_file_owner>
  <displayname_file_owner>Alice Hansen</displayname_file_owner>
  <additional_info_owner/>
  <additional_info_file_owner/>
  <path>/Alice-folder</path>
  <item_type>folder</item_type>
  <mimetype>httpd/unix-directory</mimetype>
  <storage_id>home::Alice</storage_id>
  <storage>556</storage>
  <item_source>2147537010</item_source>
  <file_source>2147537010</file_source>
  <file_parent>2147536991</file_parent>
  <file_target>/Alice-folder</file_target>
  <share_with>Brian</share_with>
  <share_with_displayname>Brian Murphy</share_with_displayname>
  <share_with_additional_info/>
  <mail_send>0</mail_send>
  <attributes/>
 </data>
</ocs>

I would expect it to be
<message>OK</message>

probably that is the case in more places, the API tests don't check the message a lot

found it when looking into https://github.com/owncloud/ocis-reva/issues/332

主要语言
PHP
星标
8.8k
派生
2.1k
平均合并
19 小时 32 分钟
30 天内合并 PR
56

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

owncloud/core 的其他 Issue

查看 owncloud/core 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。