This repository has been archived on 2026-06-02. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
FabledApp/lib/data/api/settings_api.dart
T
bvandeusen 45294ade31 feat: sync device timezone to backend on startup
On shell mount, reads the IANA timezone from the device via
flutter_timezone and POSTs it to PUT /api/settings as user_timezone.
Mirrors the web app's App.vue behaviour so briefing events and the
chat route use the correct local time on Android.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 17:24:59 -04:00

14 lines
267 B
Dart

import 'package:dio/dio.dart';
class SettingsApi {
const SettingsApi(this._dio);
final Dio _dio;
Future<void> syncTimezone(String ianaTimezone) async {
await _dio.put<void>(
'/api/settings',
data: {'user_timezone': ianaTimezone},
);
}
}