add disable customer function

This commit is contained in:
Sai Naw Wun
2020-10-17 01:40:24 +06:30
parent 13fa1903bc
commit fa9738f307
28 changed files with 196 additions and 205 deletions

View File

@@ -1,8 +1,8 @@
import 'dart:async';
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:fcs/data/services/services.dart';
import 'package:fcs/domain/entities/faq.dart';
import 'package:fcs/helpers/firebase_helper.dart';
import 'package:fcs/pages/main/model/base_model.dart';
import 'package:logging/logging.dart';
@@ -38,19 +38,16 @@ class FAQModel extends BaseModel {
Future<void> addFAQ(FAQ faq) async {
await request("/faqs", "POST",
payload: faq.toMap(),
token: await Services.instance.authService.getToken());
payload: faq.toMap(), token: await getToken());
}
Future<void> updateFAQ(FAQ faq) async {
await request("/faqs", "PUT",
payload: faq.toMap(),
token: await Services.instance.authService.getToken());
payload: faq.toMap(), token: await getToken());
}
Future<void> deleteFAQ(FAQ faq) async {
await request("/faqs", "DELETE",
payload: faq.toMap(),
token: await Services.instance.authService.getToken());
payload: faq.toMap(), token: await getToken());
}
}