move reportUrl and reportProjectId from config to setting
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:fcs/config.dart';
|
||||
import 'package:fcs/constants.dart';
|
||||
import 'package:fcs/domain/entities/package.dart';
|
||||
import 'package:fcs/helpers/api_helper.dart';
|
||||
import 'package:fcs/helpers/firebase_helper.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
|
||||
import '../services/services.dart';
|
||||
|
||||
class PackageDataProvider {
|
||||
final log = Logger('PackageDataProvider');
|
||||
|
||||
@@ -70,7 +71,7 @@ class PackageDataProvider {
|
||||
try {
|
||||
var data = await requestAPI(
|
||||
"/api/fts/$packages_collection/$escapePackage/$limit", "GET",
|
||||
url: Config.instance.reportURL, token: await getToken());
|
||||
url: Services.setting.reportURL, token: await getToken());
|
||||
|
||||
if (data == null) return [];
|
||||
|
||||
@@ -105,7 +106,7 @@ class PackageDataProvider {
|
||||
};
|
||||
var result = await requestAPI("/api/data/packages", "POST",
|
||||
token: await getToken(),
|
||||
url: Config.instance.reportURL,
|
||||
url: Services.setting.reportURL,
|
||||
payload: jsonEncode(data));
|
||||
if (result == null) return packages;
|
||||
result.forEach((d) {
|
||||
|
||||
Reference in New Issue
Block a user