From f32a92fe54455916bc67ecd3368b9e6f3b191f52 Mon Sep 17 00:00:00 2001 From: Braydon Date: Sat, 2 Dec 2023 03:44:58 -0500 Subject: [PATCH] Change ownership in licenses --- README.md | 10 +++++----- src/main/java/me/braydon/license/model/License.java | 3 +++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 4987d6b..01bbac2 100644 --- a/README.md +++ b/README.md @@ -18,11 +18,11 @@ POST /check #### Body -| Key | Type | Description | -|:----------|:---------|:-----------------------------------------------| -| `key` | `string` | **Required**. Your license key | -| `product` | `string` | **Required**. The product the license is for | -| `hwid` | `string` | **Required**. The hardware id of the requester | +| Key | Type | Description | +|:----------|:---------|:----------------------------------------------------------------| +| `key` | `string` | **Required**. Your base64 encrypted license key | +| `product` | `string` | **Required**. The product the license is for | +| `hwid` | `string` | **Required**. The base64 encrypted hardware id of the requester | #### Response diff --git a/src/main/java/me/braydon/license/model/License.java b/src/main/java/me/braydon/license/model/License.java index dda6ad8..3c5d2bb 100644 --- a/src/main/java/me/braydon/license/model/License.java +++ b/src/main/java/me/braydon/license/model/License.java @@ -14,6 +14,7 @@ import me.braydon.license.exception.LicenseHwidLimitExceededException; import me.braydon.license.exception.LicenseIpLimitExceededException; import org.springframework.data.annotation.Id; import org.springframework.data.mongodb.core.mapping.Document; +import org.springframework.data.mongodb.core.mapping.Field; import java.util.Date; import java.util.Set; @@ -49,6 +50,7 @@ public class License { * If this is -1, the license is not owned by anyone. *

*/ + @Field("owner.snowflake") private long ownerSnowflake; /** @@ -57,6 +59,7 @@ public class License { * If this is null, the license is not owned by anyone. *

*/ + @Field("owner.name") private String ownerName; /**