forked from Ivasoft/mattermost-mobile
* Remove watermelondb limitation on updating an already updated model * Add logic to handle different prepare states and improve logging * fix tests --------- Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
22 lines
610 B
TypeScript
22 lines
610 B
TypeScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import {General} from '@constants';
|
|
|
|
import type ClientBase from './base';
|
|
|
|
export interface ClientNPSMix {
|
|
npsGiveFeedbackAction: () => Promise<Post>;
|
|
}
|
|
|
|
const ClientNPS = <TBase extends Constructor<ClientBase>>(superclass: TBase) => class extends superclass {
|
|
npsGiveFeedbackAction = async () => {
|
|
return this.doFetch(
|
|
`${this.getPluginRoute(General.NPS_PLUGIN_ID)}/api/v1/give_feedback`,
|
|
{method: 'post'},
|
|
);
|
|
};
|
|
};
|
|
|
|
export default ClientNPS;
|