Skip to content

Conversation

@nickvergessen
Copy link
Member

@nickvergessen nickvergessen commented Sep 19, 2016

@nickvergessen nickvergessen added this to the Nextcloud 11.0 milestone Sep 19, 2016
@mention-bot
Copy link

@nickvergessen, thanks for your PR! By analyzing the annotation information on this pull request, we identified @icewind1991, @LukasReschke and @bartv2 to be potential reviewers

@MorrisJobke
Copy link
Member

MorrisJobke commented Sep 19, 2016

  • @nickvergessen mumbled something about "I wanted to move this somehow in the provisioning API" ...
  • see CI ;)

@MorrisJobke MorrisJobke added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Sep 19, 2016
@MorrisJobke MorrisJobke added 3. to review Waiting for reviews 2. developing Work in progress and removed 2. developing Work in progress 3. to review Waiting for reviews labels Sep 20, 2016
@MorrisJobke
Copy link
Member

@nickvergessen Fails ;)

PHP Fatal error:  Call to a member function getUpdater() on null in /drone/src/github.com/nextcloud/server/lib/private/Files/View.php on line 695

@nickvergessen
Copy link
Member Author

@icewind1991

@icewind1991
Copy link
Member

I would prefer to return a promise from OCP.AppConfig.* instead of passing callbacks

@nickvergessen
Copy link
Member Author

Can you just take care of fixing the failing phpunit tests which I didn't touch?

We can discuss promises later, although I don't feel a lot like breaking the current js API.

@icewind1991
Copy link
Member

PHP Warning: opendir(/drone/src/github.com/nextcloud/server/data-autotest): failed to open dir: No such file or directory in /drone/src/github.com/nextcloud/server/tests/lib/TestCase.php on line 300

Drone messing up?

@MorrisJobke
Copy link
Member

Drone messing up?

I restarted it. Let's see

@nickvergessen nickvergessen added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Oct 17, 2016
@nickvergessen
Copy link
Member Author

I think I found the issue, will fix myself

@codecov-io
Copy link

codecov-io commented Oct 20, 2016

Current coverage is 57.26% (diff: 71.18%)

Merging #1452 into master will increase coverage by 0.04%

@@             master      #1452   diff @@
==========================================
  Files          1074       1075     +1   
  Lines         61308      61661   +353   
  Methods        6848       6892    +44   
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          35084      35312   +228   
- Misses        26224      26349   +125   
  Partials          0          0          

Sunburst

Diff Coverage File Path
0% apps/provisioning_api/appinfo/routes.php
•••••••• 80% new ...visioning_api/lib/Controller/AppConfigController.php
•••••••••• 100% core/routes.php
•••••••••• 100% lib/private/legacy/template.php

Powered by Codecov. Last update 2b76d14...2aca56f

Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen
Copy link
Member Author

Rebased for #1822 and added php unit tests

@icewind1991 do you want to do the promise stuff in here, or can we do it in a different PR? I have no idea what that is and how it works.

data: options.data || {},
success: options.success,
error: options.error
})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Semicolon

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

* @param {string} key
* @param {Object} [options]
* @param {function} [options.success]
* @param {function} [options.error]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proper documentation for the parameters would be nice

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well no documentation means nothing you should use?
Feel free to add something if you think it should be.

Signed-off-by: Joas Schilling <coding@schilljs.com>
['name' => 'AppConfig#getKeys', 'url' => '/api/v1/config/apps/{app}', 'verb' => 'GET'],
['name' => 'AppConfig#getValue', 'url' => '/api/v1/config/apps/{app}/{key}', 'verb' => 'GET'],
['name' => 'AppConfig#setValue', 'url' => '/api/v1/config/apps/{app}/{key}', 'verb' => 'POST'],
['name' => 'AppConfig#deleteKey', 'url' => '/api/v1/config/apps/{app}/{key}', 'verb' => 'DELETE'],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really want to name this /api/ again?

This then results in stuff like http://localhost/server/ocs/v2.php/apps/provisioning_api/api/v1/config/apps/files_sharing/outgoing_server2server_share_enabled

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is what all ocs routes use

@MorrisJobke
Copy link
Member

Beside the naming comment this is fine by me and works 👍

@rullzer
Copy link
Member

rullzer commented Oct 25, 2016

LGTM

@nickvergessen nickvergessen merged commit 890f752 into master Oct 25, 2016
@nickvergessen nickvergessen deleted the appconfig-endpoint branch October 25, 2016 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants