refactor(frontend): adapt to RESTful API routes
This commit is contained in:
@@ -35,32 +35,12 @@ class AuthResponse {
|
||||
}
|
||||
}
|
||||
|
||||
class SignupStartResponse {
|
||||
final String status;
|
||||
class VerificationCreateResponse {
|
||||
final String email;
|
||||
final String message;
|
||||
|
||||
const SignupStartResponse({
|
||||
required this.status,
|
||||
required this.email,
|
||||
required this.message,
|
||||
});
|
||||
const VerificationCreateResponse({required this.email});
|
||||
|
||||
factory SignupStartResponse.fromJson(Map<String, dynamic> json) {
|
||||
return SignupStartResponse(
|
||||
status: json['status'] as String,
|
||||
email: json['email'] as String,
|
||||
message: json['message'] as String,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class SignupResendResponse {
|
||||
final String message;
|
||||
|
||||
const SignupResendResponse({required this.message});
|
||||
|
||||
factory SignupResendResponse.fromJson(Map<String, dynamic> json) {
|
||||
return SignupResendResponse(message: json['message'] as String);
|
||||
factory VerificationCreateResponse.fromJson(Map<String, dynamic> json) {
|
||||
return VerificationCreateResponse(email: json['email'] as String);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user