summaryrefslogtreecommitdiff
path: root/User.cs
diff options
context:
space:
mode:
Diffstat (limited to 'User.cs')
-rw-r--r--User.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/User.cs b/User.cs
index 61ef03f..87384d2 100644
--- a/User.cs
+++ b/User.cs
@@ -6,4 +6,10 @@ namespace HyperBooru;
public class User : HBObject {
public string Username { get; set; }
public string PasswordHash { get; set; }
+
+ public static explicit operator ApiModels.User(User user) =>
+ new() {
+ UserId = user.Guid,
+ Username = user.Username
+ };
}