Unify feedback and ticket forms
This commit is contained in:
@@ -469,22 +469,9 @@ angular.module('Application').service('Client', ['$http', 'md5', 'Notification',
|
||||
}).error(defaultErrorHandler(callback));
|
||||
};
|
||||
|
||||
Client.prototype.feedback = function (subject, description, callback) {
|
||||
Client.prototype.feedback = function (type, subject, description, callback) {
|
||||
var data = {
|
||||
type: 'feedback',
|
||||
subject: subject,
|
||||
description: description
|
||||
};
|
||||
|
||||
$http.post(client.apiOrigin + '/api/v1/cloudron/feedback', data).success(function (data, status) {
|
||||
if (status !== 201) return callback(new ClientError(status, data));
|
||||
callback(null);
|
||||
}).error(defaultErrorHandler(callback));
|
||||
};
|
||||
|
||||
Client.prototype.ticket = function (subject, description, callback) {
|
||||
var data = {
|
||||
type: 'ticket',
|
||||
type: type,
|
||||
subject: subject,
|
||||
description: description
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user