Sync API with flutter_lints v2.0.1
This commit is contained in:
parent
d76512d7c6
commit
136cd4753e
1 changed files with 7 additions and 7 deletions
|
@ -2,20 +2,20 @@ import 'package:dio/dio.dart';
|
|||
import 'package:nekoya_flutter/api/config.dart';
|
||||
|
||||
Future<dynamic> getProducts() async {
|
||||
var req = await Dio().get(host + '/getproducts');
|
||||
var req = await Dio().get('$host/getproducts');
|
||||
var res = req.data;
|
||||
return res;
|
||||
}
|
||||
|
||||
Future<dynamic> getProduct(id) async {
|
||||
var req = await Dio().get(host + '/getproduct', queryParameters: {'id': id});
|
||||
var req = await Dio().get('$host/getproduct', queryParameters: {'id': id});
|
||||
var res = req.data;
|
||||
return res;
|
||||
}
|
||||
|
||||
Future<dynamic> registerPost(data) async {
|
||||
Response req = await Dio().post(
|
||||
(host + '/register'),
|
||||
('$host/register'),
|
||||
data: data,
|
||||
options: Options(
|
||||
contentType: Headers.formUrlEncodedContentType,
|
||||
|
@ -29,7 +29,7 @@ Future<dynamic> registerPost(data) async {
|
|||
|
||||
Future<dynamic> loginPost({email, password}) async {
|
||||
Response req = await Dio().post(
|
||||
(host + '/login'),
|
||||
('$host/login'),
|
||||
data: {
|
||||
'email': email,
|
||||
'password': password,
|
||||
|
@ -48,7 +48,7 @@ Future<dynamic> getSessions() async {
|
|||
String tempKey =
|
||||
'rTugfHPB7Cd4I1OmsbFCHuJvBSjA2C48WOcMghviohNlNj8IZqazvtwJrdGFHDwp';
|
||||
var req = await Dio()
|
||||
.post(host + '/sessions', queryParameters: {'key': tempKey});
|
||||
.post('$host/sessions', queryParameters: {'key': tempKey});
|
||||
var res = req.data;
|
||||
return res;
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ Future<dynamic> getTransactions() async {
|
|||
String tempKey =
|
||||
'rTugfHPB7Cd4I1OmsbFCHuJvBSjA2C48WOcMghviohNlNj8IZqazvtwJrdGFHDwp';
|
||||
var req = await Dio()
|
||||
.post(host + '/transaction', queryParameters: {'key': tempKey});
|
||||
.post('$host/transaction', queryParameters: {'key': tempKey});
|
||||
var res = req.data;
|
||||
return res;
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ Future<dynamic> checkoutPost(data) async {
|
|||
String tempKey =
|
||||
'rTugfHPB7Cd4I1OmsbFCHuJvBSjA2C48WOcMghviohNlNj8IZqazvtwJrdGFHDwp';
|
||||
Response req = await Dio().post(
|
||||
(host + '/checkout'),
|
||||
('$host/checkout'),
|
||||
queryParameters: {'key': tempKey},
|
||||
data: data,
|
||||
options: Options(
|
||||
|
|
Loading…
Reference in a new issue