mirror of
https://github.com/Dvorinka/1356.git
synced 2026-06-05 04:22:55 +00:00
small fix, don't worry about it
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import 'package:supabase_flutter/supabase_flutter.dart' as supabase;
|
||||
import '../models/user_model.dart' as app;
|
||||
import '../../core/errors/failure.dart';
|
||||
import '../../core/utils/unit_conversion_utils.dart';
|
||||
|
||||
class UserRepository {
|
||||
final supabase.SupabaseClient _client;
|
||||
@@ -35,6 +36,12 @@ class UserRepository {
|
||||
String? instagramHandle,
|
||||
String? tiktokHandle,
|
||||
String? websiteUrl,
|
||||
Gender? gender,
|
||||
DateTime? birthDate,
|
||||
double? heightCm,
|
||||
double? weightKg,
|
||||
HeightUnit heightUnit = HeightUnit.metric,
|
||||
WeightUnit weightUnit = WeightUnit.metric,
|
||||
}) async {
|
||||
try {
|
||||
final updates = <String, dynamic>{};
|
||||
@@ -46,6 +53,12 @@ class UserRepository {
|
||||
if (instagramHandle != null) updates['instagram_handle'] = instagramHandle;
|
||||
if (tiktokHandle != null) updates['tiktok_handle'] = tiktokHandle;
|
||||
if (websiteUrl != null) updates['website_url'] = websiteUrl;
|
||||
if (gender != null) updates['gender'] = gender.toDatabaseString();
|
||||
if (birthDate != null) updates['birth_date'] = birthDate.toIso8601String().split('T').first;
|
||||
if (heightCm != null) updates['height_cm'] = heightCm;
|
||||
if (weightKg != null) updates['weight_kg'] = weightKg;
|
||||
updates['height_unit'] = heightUnit.code;
|
||||
updates['weight_unit'] = weightUnit.code;
|
||||
updates['updated_at'] = DateTime.now().toIso8601String();
|
||||
|
||||
final response = await _client
|
||||
|
||||
Reference in New Issue
Block a user