Skip to content

API: let the modified time be changeable#4

Merged
Henni merged 1 commit into
masterfrom
api-changeable-modified
Dec 1, 2016
Merged

API: let the modified time be changeable#4
Henni merged 1 commit into
masterfrom
api-changeable-modified

Conversation

@korelstar

@korelstar korelstar commented Oct 24, 2016

Copy link
Copy Markdown
Member

It will close owncloud/notes#247:

If a note is created/edited using a 3rd-party app, this can be done in offline mode. Therefore, there can be a time difference between editing the note on the client and putting the changed data to the server through the API. However, the modified time will be set to the time when putting the data to the server.

This behavior can be confusing for the user, since the shown modified time does not reflect what (when) the user did.

I propose to extend the API and introduce a new optional field modified which can be passed when creating or updating a note, beside content.

Tasks

  • API: let the modified time be changeable
  • API: allow setting favorites in create, refactoring

@Henni

Henni commented Oct 24, 2016

Copy link
Copy Markdown
Member

Note to myself: this also adds favorite functionality

Comment thread controller/notesapicontroller.php Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What happens if this defaults to 0?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

If modified is not stated in the request, the behavior is the same as before of my changes: the mtime of the note's file is set to the current date/time.

Therefore, my changes of the API are totally backward compatible. However, the API documentation has to be revised. But the wiki has not been transferred, yet.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

@korelstar korelstar force-pushed the api-changeable-modified branch from 96f7598 to 7d914c8 Compare October 26, 2016 13:53
@korelstar korelstar changed the title [WIP] API: let the modified time be changeable API: let the modified time be changeable Oct 26, 2016
@korelstar

Copy link
Copy Markdown
Member Author

I'm done -- from my site, this can be merged.

@Henni

Henni commented Oct 26, 2016

Copy link
Copy Markdown
Member

Looks good to me.
@stefan-niedermann would you like to take a look, as this affects your awesome app.

@stefan-niedermann

Copy link
Copy Markdown
Member

Yeap, i have already subscribed this issue :) Will have a look at implementation when i have some free time

@korelstar

Copy link
Copy Markdown
Member Author

Can this be merged, now?

@Henni

Henni commented Dec 1, 2016

Copy link
Copy Markdown
Member

@stefan-niedermann ping

@stefan-niedermann

Copy link
Copy Markdown
Member

LGTM 👍
Ready to merge from my point of view 😃

@Henni Henni merged commit a8d91de into master Dec 1, 2016
@Henni Henni deleted the api-changeable-modified branch December 1, 2016 20:26
@Henni

Henni commented Dec 1, 2016

Copy link
Copy Markdown
Member

Awesome! Happy we got this in! 🎉

@korelstar korelstar added the feature: API Related to the API for 3rd-party apps, i.e. Android or iOS label Jan 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request feature: API Related to the API for 3rd-party apps, i.e. Android or iOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

API: let the modified time be changeable

3 participants