Fix errors in prod backend and android app

This commit is contained in:
Reimar 2024-09-16 13:31:02 +02:00
parent 66640261c3
commit 3922906a33
Signed by: Reimar
GPG Key ID: 93549FA07F0AE268
5 changed files with 12 additions and 0 deletions

View File

@ -8,6 +8,7 @@ Environment=PATH=$PATH:/home/reimar/.dotnet
Environment=DEFAULT_CONNECTION="Data Source=/home/reimar/skantravels/database.sqlite3" Environment=DEFAULT_CONNECTION="Data Source=/home/reimar/skantravels/database.sqlite3"
ExecStartPre=/home/reimar/skantravels/efbundle ExecStartPre=/home/reimar/skantravels/efbundle
ExecStart=/home/reimar/skantravels/API --urls=http://0.0.0.0:5001 ExecStart=/home/reimar/skantravels/API --urls=http://0.0.0.0:5001
WorkingDirectory=/home/reimar/skantravels
Type=simple Type=simple
[Install] [Install]

4
Mobile/build-apk.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
java -version
flutter build apk --split-per-abi --dart-define-from-file environment.prod.json

View File

@ -0,0 +1,4 @@
{
"AUTH_SERVICE_HOST": "https://skantravels.reim.ar",
"APP_SERVICE_HOST": "https://skantravels.reim.ar"
}

View File

@ -18,6 +18,8 @@ import 'api.dart' as api;
import 'package:http/http.dart' as http; import 'package:http/http.dart' as http;
void main() async { void main() async {
WidgetsFlutterBinding.ensureInitialized();
// Refresh JWT on startup // Refresh JWT on startup
final prefs = await SharedPreferences.getInstance(); final prefs = await SharedPreferences.getInstance();
if (prefs.getString("token") != null && prefs.getString("refresh-token") != null) { if (prefs.getString("token") != null && prefs.getString("refresh-token") != null) {

View File

@ -6,6 +6,7 @@ After=network.target
Environment=RUST_BACKEND_PORT=5002 Environment=RUST_BACKEND_PORT=5002
Environment=RUST_BACKEND_DB=/home/reimar/skantravels/database-rust.sqlite3 Environment=RUST_BACKEND_DB=/home/reimar/skantravels/database-rust.sqlite3
ExecStart=/home/reimar/skantravels/skantravels ExecStart=/home/reimar/skantravels/skantravels
WorkingDirectory=/home/reimar/skantravels
Type=simple Type=simple
[Install] [Install]