fix:swager
This commit is contained in:
parent
f8cdf405bb
commit
3b9ed176ff
|
@ -11,7 +11,7 @@ const swaggerOptions = {
|
|||
},
|
||||
servers: [
|
||||
{
|
||||
url: 'https://localhost:5000', // Development server URL
|
||||
url: 'http://localhost:5000', // Development server URL
|
||||
description: 'Production Server'
|
||||
},
|
||||
],
|
||||
|
|
|
@ -7,15 +7,15 @@ import 'package:image_picker/image_picker.dart';
|
|||
import 'package:http_parser/http_parser.dart';
|
||||
|
||||
class ApiService {
|
||||
static const String baseUrl = 'https://beckend-sistem-pakar-diagnosa-penyakit.onrender.com/api/auth';
|
||||
static const String gejalaUrl = 'https://beckend-sistem-pakar-diagnosa-penyakit.onrender.com/api/gejala';
|
||||
static const String hamaUrl = 'https://beckend-sistem-pakar-diagnosa-penyakit.onrender.com/api/hama';
|
||||
static const String penyakitUrl = 'https://beckend-sistem-pakar-diagnosa-penyakit.onrender.com/api/penyakit';
|
||||
static const String rulesPenyakitUrl ='https://beckend-sistem-pakar-diagnosa-penyakit.onrender.com/api/rules_penyakit';
|
||||
static const String rulesHamaUrl = 'https://beckend-sistem-pakar-diagnosa-penyakit.onrender.com/api/rules_hama';
|
||||
static const String userUrl = 'https://beckend-sistem-pakar-diagnosa-penyakit.onrender.com/api/users';
|
||||
static const String diagnosaUrl = 'https://beckend-sistem-pakar-diagnosa-penyakit.onrender.com/api/diagnosa';
|
||||
static const String historiUrl = 'https://beckend-sistem-pakar-diagnosa-penyakit.onrender.com/api/histori';
|
||||
static const String baseUrl = 'http://202.74.74.214/api/auth';
|
||||
static const String gejalaUrl = 'http://202.74.74.214/api/gejala';
|
||||
static const String hamaUrl = 'http://202.74.74.214/api/hama';
|
||||
static const String penyakitUrl = 'http://202.74.74.214/api/penyakit';
|
||||
static const String rulesPenyakitUrl ='http://202.74.74.214/api/rules_penyakit';
|
||||
static const String rulesHamaUrl = 'http://202.74.74.214/api/rules_hama';
|
||||
static const String userUrl = 'http://202.74.74.214/api/users';
|
||||
static const String diagnosaUrl = 'http://202.74.74.214/api/diagnosa';
|
||||
static const String historiUrl = 'http://202.74.74.214/api/histori';
|
||||
static const Duration timeout = Duration(seconds: 15);
|
||||
|
||||
/// Fungsi untuk mengirim gejala dan menerima hasil diagnosa
|
||||
|
@ -573,7 +573,7 @@ Future<List<Map<String, dynamic>>> getAllHistori() async {
|
|||
|
||||
Future<Uint8List?> getHamaImageBytesByFilename(String filename) async {
|
||||
try {
|
||||
final url = Uri.parse('https://beckend-sistem-pakar-diagnosa-penyakit.onrender.com/image_hama/$filename');
|
||||
final url = Uri.parse('http://202.74.74.214/image_hama/$filename');
|
||||
print('Fetching image from: $url');
|
||||
final response = await http.get(url);
|
||||
|
||||
|
@ -875,7 +875,7 @@ Future<List<Map<String, dynamic>>> getAllHistori() async {
|
|||
|
||||
Future<Uint8List?> getPenyakitImageBytesByFilename(String filename) async {
|
||||
try {
|
||||
final url = Uri.parse('https://beckend-sistem-pakar-diagnosa-penyakit.onrender.com/image_penyakit/$filename');
|
||||
final url = Uri.parse('http://202.74.74.214/image_penyakit/$filename');
|
||||
print('Fetching image from: $url');
|
||||
final response = await http.get(url);
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ class _LoginPageState extends State<LoginPage> {
|
|||
|
||||
try {
|
||||
var url = Uri.parse(
|
||||
"https://beckend-sistem-pakar-diagnosa-penyakit.onrender.com/api/auth/login",
|
||||
"http://202.74.74.214/api/auth/login",
|
||||
);
|
||||
var response = await http.post(
|
||||
url,
|
||||
|
|
|
@ -63,7 +63,7 @@ class _ProfilPageState extends State<ProfilPage> {
|
|||
}
|
||||
|
||||
// Buat URL untuk endpoint user API
|
||||
var url = Uri.parse("https://beckend-sistem-pakar-diagnosa-penyakit.onrender.com/api/users");
|
||||
var url = Uri.parse("http://202.74.74.214/api/users");
|
||||
|
||||
// Kirim permintaan GET dengan token autentikasi
|
||||
var response = await http.get(
|
||||
|
|
|
@ -95,7 +95,7 @@ class _RiwayatDiagnosaPageState extends State<RiwayatDiagnosaPage> {
|
|||
try {
|
||||
// Buat URL untuk endpoint user API
|
||||
var url = Uri.parse(
|
||||
"https://beckend-sistem-pakar-diagnosa-penyakit.onrender.com/api/users",
|
||||
"http://202.74.74.214/api/users",
|
||||
);
|
||||
|
||||
// Kirim permintaan GET dengan token autentikasi
|
||||
|
|
Loading…
Reference in New Issue