Testing is complete!! And a nice build runner script to boot

This commit is contained in:
2025-02-05 13:16:12 -07:00
parent 4864de624c
commit 76ea825509
25 changed files with 1453 additions and 103 deletions
+17
View File
@@ -0,0 +1,17 @@
import 'package:json_annotation/json_annotation.dart';
part 'jwt.g.dart';
@JsonSerializable()
class JWTBody {
String uuid;
String roomUuid;
int iat;
int exp;
JWTBody({required this.uuid, required this.roomUuid, required this.iat, required this.exp});
factory JWTBody.fromJson(Map<String, dynamic> json) => _$JWTBodyFromJson(json);
Map<String, dynamic> toJson() => _$JWTBodyToJson(this);
}
+6 -1
View File
@@ -2,6 +2,8 @@ import 'package:json_annotation/json_annotation.dart';
part 'user.g.dart';
typedef JoinRoomRequest = CreateUserRequest;
@JsonSerializable()
class CreateUserRequest {
final String username;
@@ -13,13 +15,16 @@ class CreateUserRequest {
Map<String, dynamic> toJson() => _$CreateUserRequestToJson(this);
}
typedef JoinRoomResponse = CreateUserResponse;
@JsonSerializable()
class CreateUserResponse {
final String? token;
final String? error;
final String? uuid;
final bool success;
CreateUserResponse({required this.token, required this.success, this.error});
CreateUserResponse({required this.token, required this.uuid, required this.success, this.error});
factory CreateUserResponse.fromJson(Map<String, dynamic> json) => _$CreateUserResponseFromJson(json);