Skip to content

Commit

Permalink
fix: change http to https
Browse files Browse the repository at this point in the history
  • Loading branch information
iyoubee committed Jun 5, 2023
1 parent 24cd753 commit f3a9f75
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion lib/pages/LoginPage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ class _LoginPageState extends State<LoginPage> {
_formKey.currentState?.save();
final response = await request
.login(
"http://trashsure.iyoubee.xyz/flutter/login/",
"https://trashsure.iyoubee.xyz/flutter/login/",
{
'username': _email,
'password': _password,
Expand Down
2 changes: 1 addition & 1 deletion lib/pages/RegisterPage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ class _RegisterPageState extends State<RegisterPage> {
_formKey.currentState?.save();
final response = await request
.post(
"http://trashsure.iyoubee.xyz/flutter/register/",
"https://trashsure.iyoubee.xyz/flutter/register/",
{
'username': _email,
'password': _password,
Expand Down
2 changes: 1 addition & 1 deletion lib/pages/admin/AdminPage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class _AdminPageState extends State<AdminPage> {
onPressed: () async {
// do something
final response = await request
.logout("http://trashsure.iyoubee.xyz/flutter/logout/")
.logout("https://trashsure.iyoubee.xyz/flutter/logout/")
.then((value) => {
if (value['status'] == 200)
{
Expand Down
2 changes: 1 addition & 1 deletion lib/pages/user/UserPage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class _UserPageState extends State<UserPage> {
onPressed: () async {
// do something
final response = await request
.logout("http://trashsure.iyoubee.xyz/flutter/logout/")
.logout("https://trashsure.iyoubee.xyz/flutter/logout/")
.then((value) => {
if (value['status'] == 200)
{
Expand Down
10 changes: 5 additions & 5 deletions lib/utils/useAdminDeposit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import '../models/Deposit.dart';
class UseAdminDeposit {
Future<List<Deposit>> getAdminDeposit(request) async {
var response = await request
.get('http://trashsure.iyoubee.xyz/flutter/admin/deposit/get/');
.get('https://trashsure.iyoubee.xyz/flutter/admin/deposit/get/');

var data = response;

Expand All @@ -21,7 +21,7 @@ class UseAdminDeposit {

Future<List<UserData>> getUsername(request) async {
var response = await request
.get('http://trashsure.iyoubee.xyz/flutter/admin/username/get/');
.get('https://trashsure.iyoubee.xyz/flutter/admin/username/get/');

var data = response;

Expand All @@ -37,7 +37,7 @@ class UseAdminDeposit {

addDeposit(context, request, username, jenisSampah, beratSampah) async {
var response = await request.post(
'http://trashsure.iyoubee.xyz/flutter/admin/deposit/add/', {
'https://trashsure.iyoubee.xyz/flutter/admin/deposit/add/', {
"user": username,
"jenisSampah": jenisSampah,
"beratSampah": beratSampah
Expand All @@ -48,14 +48,14 @@ class UseAdminDeposit {

accDeposit(context, pk, request) async {
var response = await request.post(
'http://trashsure.iyoubee.xyz/flutter/admin/deposit/acc/', {"id": pk});
'https://trashsure.iyoubee.xyz/flutter/admin/deposit/acc/', {"id": pk});

return response['status'];
}

delDeposit(context, pk, request) async {
var response = await request.post(
'http://trashsure.iyoubee.xyz/flutter/admin/deposit/del/', {"id": pk});
'https://trashsure.iyoubee.xyz/flutter/admin/deposit/del/', {"id": pk});

return response['status'];
}
Expand Down
6 changes: 3 additions & 3 deletions lib/utils/useAdminPrize.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'package:trashsure/models/Prize.dart';
class UseAdminPrize {
Future<List<Prize>> getAdminPrize(request) async {
var response = await request
.get('http://trashsure.iyoubee.xyz/flutter/admin/prize/get/');
.get('https://trashsure.iyoubee.xyz/flutter/admin/prize/get/');

var data = response;

Expand All @@ -20,15 +20,15 @@ class UseAdminPrize {

addPrize(context, request, nama, poin, stok, desc) async {
var response = await request.post(
'http://trashsure.iyoubee.xyz/flutter/admin/prize/add/',
'https://trashsure.iyoubee.xyz/flutter/admin/prize/add/',
{"nama": nama, "poin": poin, "stok": stok, "desc": desc});

return response['status'];
}

delPrize(context, pk, request) async {
var response = await request.post(
'http://trashsure.iyoubee.xyz/flutter/admin/prize/del/', {"id": pk});
'https://trashsure.iyoubee.xyz/flutter/admin/prize/del/', {"id": pk});

return response['status'];
}
Expand Down
4 changes: 2 additions & 2 deletions lib/utils/useTestimoni.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'dart:convert';

class UseTestimoni {
Future<List<Testimoni>> fetchTestimoni() async {
var url = Uri.parse('http://trashsure.iyoubee.xyz/testimoni/get/');
var url = Uri.parse('https://trashsure.iyoubee.xyz/testimoni/get/');
var response = await http.get(url);
// melakukan decode response menjadi bentuk json
var data = jsonDecode(utf8.decode(response.bodyBytes));
Expand All @@ -23,7 +23,7 @@ class UseTestimoni {

Future<dynamic> addTestimoni(context, request, desc) async {
var response = await request
.post('http://trashsure.iyoubee.xyz/flutter/user/testimoni/add/', {
.post('https://trashsure.iyoubee.xyz/flutter/user/testimoni/add/', {
"desc": desc,
});

Expand Down
4 changes: 2 additions & 2 deletions lib/utils/useUserDeposit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import '../models/Deposit.dart';
class UseUserDeposit {
Future<List<Deposit>> getUserDeposit(request) async {
var response = await request
.get('http://trashsure.iyoubee.xyz/flutter/user/deposit/get/');
.get('https://trashsure.iyoubee.xyz/flutter/user/deposit/get/');

var data = response;

Expand All @@ -20,7 +20,7 @@ class UseUserDeposit {

addDeposit(context, request, jenisSampah, beratSampah) async {
var response = await request.post(
'http://trashsure.iyoubee.xyz/flutter/user/deposit/add/',
'https://trashsure.iyoubee.xyz/flutter/user/deposit/add/',
{"jenisSampah": jenisSampah, "beratSampah": beratSampah});

return response['status'];
Expand Down
10 changes: 5 additions & 5 deletions lib/utils/useUserPrize.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class UseUserPrize {
// To fetch prize data from admin
Future<List<Prize>> getPrize(request) async {
var response = await request
.get('http://trashsure.iyoubee.xyz/flutter/user/prize/get/');
.get('https://trashsure.iyoubee.xyz/flutter/user/prize/get/');

// melakukan decode response menjadi bentuk json
var data = response;
Expand All @@ -26,7 +26,7 @@ class UseUserPrize {
// To fetch redeemed prize data from certain user
Future<List<RedeemedPrize>> getRedeemedPrize(request) async {
var response = await request
.get('http://trashsure.iyoubee.xyz/flutter/user/prize/redeem/get/');
.get('https://trashsure.iyoubee.xyz/flutter/user/prize/redeem/get/');

// melakukan decode response menjadi bentuk json
var data = response;
Expand All @@ -44,15 +44,15 @@ class UseUserPrize {
// Method to redeem the prize
redeemPrize(context, pk, request) async {
var response = await request.post(
'http://trashsure.iyoubee.xyz/flutter/user/prize/redeem/', {"id": pk});
'https://trashsure.iyoubee.xyz/flutter/user/prize/redeem/', {"id": pk});

return response['message'];
}

// Method to use the prize
usePrize(context, pk, request) async {
var response = await request.post(
'http://trashsure.iyoubee.xyz/flutter/user/prize/redeem/use/',
'https://trashsure.iyoubee.xyz/flutter/user/prize/redeem/use/',
{"id": pk});

return response['message'];
Expand All @@ -61,7 +61,7 @@ class UseUserPrize {
// Method to get user points
Future<int> getPoints(request) async {
var response = await request
.get('http://trashsure.iyoubee.xyz/flutter/user/data/get/');
.get('https://trashsure.iyoubee.xyz/flutter/user/data/get/');

var data = response;

Expand Down
6 changes: 3 additions & 3 deletions lib/utils/useUserWithdraw.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import '../models/Withdraw.dart';
class UseUserWithdraw {
Future<List<Withdraw>> getWithdraw(request) async {
var response = await request
.get('http://trashsure.iyoubee.xyz/flutter/user/withdraw/get/');
.get('https://trashsure.iyoubee.xyz/flutter/user/withdraw/get/');

var data = response;

Expand All @@ -21,7 +21,7 @@ class UseUserWithdraw {

Future<List<UserData>> getBalance(request) async {
var response = await request
.get('http://trashsure.iyoubee.xyz/flutter/user/data/get/');
.get('https://trashsure.iyoubee.xyz/flutter/user/data/get/');

var data = response;

Expand All @@ -37,7 +37,7 @@ class UseUserWithdraw {

Future<dynamic> addWithdraw(context, request, jumlah) async {
var response = await request
.post('http://trashsure.iyoubee.xyz/flutter/user/withdraw/add/', {
.post('https://trashsure.iyoubee.xyz/flutter/user/withdraw/add/', {
"jumlah": jumlah,
});

Expand Down

0 comments on commit f3a9f75

Please sign in to comment.