summaryrefslogtreecommitdiffstats
path: root/integrations/api_comment_test.go
Commit message (Expand)AuthorAgeFilesLines
* [API] Add "before" query to ListIssueComments and ListRepoIssue… (#9685)65432020-01-131-2/+25
* [API] add comments endpoint for single comment (#9494)65432020-01-081-0/+27
* Fix "data race" in testlogger (#9159)zeripath2019-11-261-5/+5
* Move sdk structs to modules/structs (#6905)Lunny Xiao2019-05-111-1/+1
* Enforce token on api routes [fixed critical security issue #4357] (#4840)B-OnTheGo2018-09-101-6/+9
* Fix comment API paths (#2813)Ethan Koenig2017-11-201-4/+4
* More integration tests for comment API (#2156)Ethan Koenig2017-07-141-1/+90
* Less verbose integration tests (#2123)Ethan Koenig2017-07-071-2/+1
* Improve integration test helper functions (#2049)Ethan Koenig2017-06-251-3/+1
* Don't show non-comments in comments API (#2001)Ethan Koenig2017-06-181-0/+39
automated/noid/stable26-update-ca-cert-bundle'>automated/noid/stable26-update-ca-cert-bundle Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
summaryrefslogtreecommitdiffstats
path: root/settings/js/usersettings.js
blob: fcfe556b1d9a67183ecadf6a1a7982af995753ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/* global OC */

/**
 * Copyright (c) 2016, Christoph Wurst <christoph@owncloud.com>
 *
 * This file is licensed under the Affero General Public License version 3 or later.
 * See the COPYING-README file.
 */

(function() {
	'use strict';

	/**
	 * Model for storing and saving user settings
	 *
	 * @class UserSettings
	 */
	var UserSettings = OC.Backbone.Model.extend({
		url: OC.generateUrl('/settings/users/{id}/settings', {id: OC.currentUser}),
		isNew: function() {
			return false; // Force PUT on .save()
		},
		parse: function(data) {
			if (_.isUndefined(data)) {
				return null;
			}
			if (_.isUndefined(data.data)) {
				return null;
			}
			data = data.data;

			var ignored = [
				'userId',
				'message'
			];

			_.each(ignored, function(ign) {
				if (!_.isUndefined(data[ign])) {
					delete data[ign];
				}
			});

			return data;
		}
	});

	OC.Settings = OC.Settings || {};

	OC.Settings.UserSettings = UserSettings;
})();