Update to fix a few issues

This commit is contained in:
zontreck 2024-08-28 11:30:57 -07:00
parent e2883808f4
commit b4020a275f
9 changed files with 38 additions and 165 deletions

View file

@ -5,34 +5,6 @@ import 'package:libac_dart/utils/Hashing.dart';
import 'package:servermanager/structs/discordHookHelper.dart';
import 'package:servermanager/structs/settings.dart';
class Credentials {
String username;
String password;
Credentials({
required this.username,
required this.password,
});
CompoundTag save() {
CompoundTag tag = CompoundTag();
tag.put(TAG_USERNAME, StringTag.valueOf(username));
tag.put(TAG_PASSWORD, StringTag.valueOf(password));
return tag;
}
static Credentials deserialize(CompoundTag tag) {
return Credentials(
username: tag.get(TAG_USERNAME)?.asString() ?? "",
password: tag.get(TAG_PASSWORD)?.asString() ?? "");
}
static const TAG_NAME = "credentials";
static const TAG_USERNAME = "username";
static const TAG_PASSWORD = "password";
}
class User {
String name;
String passwordHash;