-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feature/hub-more-info
- Loading branch information
Showing
44 changed files
with
1,940 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
namespace OpenShock.API.Models.Requests; | ||
| ||
using OpenShock.Common.DataAnnotations; | ||
|
||
namespace OpenShock.API.Models.Requests; | ||
|
||
public sealed class ChangeEmailRequest | ||
{ | ||
[EmailAddress(true)] | ||
public required string Email { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
namespace OpenShock.API.Models.Requests; | ||
using System.ComponentModel.DataAnnotations; | ||
using OpenShock.Common.DataAnnotations; | ||
|
||
namespace OpenShock.API.Models.Requests; | ||
|
||
public sealed class ChangePasswordRequest | ||
{ | ||
[Required(AllowEmptyStrings = false)] | ||
public required string OldPassword { get; set; } | ||
|
||
[Password(true)] | ||
public required string NewPassword { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
namespace OpenShock.API.Models.Requests; | ||
using System.ComponentModel.DataAnnotations; | ||
using OpenShock.Common.Constants; | ||
using OpenShock.Common.DataAnnotations; | ||
|
||
namespace OpenShock.API.Models.Requests; | ||
|
||
public sealed class ChangeUsernameRequest | ||
{ | ||
[Username(true)] | ||
public required string Username { get; init; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
using System.ComponentModel.DataAnnotations; | ||
using OpenShock.Common.Constants; | ||
|
||
namespace OpenShock.API.Models.Requests; | ||
|
||
public sealed class HubCreateRequest | ||
{ | ||
[Required(AllowEmptyStrings = false)] | ||
[StringLength(32, MinimumLength = 1)] | ||
[StringLength(HardLimits.HubNameMaxLength, MinimumLength = HardLimits.HubNameMinLength)] | ||
public required string Name { get; init; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
using System.ComponentModel.DataAnnotations; | ||
using OpenShock.Common.Constants; | ||
|
||
namespace OpenShock.API.Models.Requests; | ||
|
||
public sealed class HubEditRequest | ||
{ | ||
[Required(AllowEmptyStrings = false)] | ||
[StringLength(32, MinimumLength = 1)] | ||
[StringLength(HardLimits.HubNameMaxLength, MinimumLength = HardLimits.HubNameMinLength)] | ||
public required string Name { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
using System.ComponentModel.DataAnnotations; | ||
using OpenShock.Common.Constants; | ||
|
||
namespace OpenShock.API.Models.Requests; | ||
|
||
public sealed class Login | ||
{ | ||
[MinLength(1)] | ||
[Required(AllowEmptyStrings = false)] | ||
public required string Password { get; set; } | ||
[MinLength(1)] | ||
|
||
[Required(AllowEmptyStrings = false)] | ||
public required string Email { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
using System.ComponentModel.DataAnnotations; | ||
using OpenShock.Common.Constants; | ||
|
||
namespace OpenShock.API.Models.Requests; | ||
|
||
public sealed class LoginV2 | ||
{ | ||
[Required(AllowEmptyStrings = false)] public required string Password { get; set; } | ||
[Required(AllowEmptyStrings = false)] public required string Email { get; set; } | ||
[Required(AllowEmptyStrings = false)] public required string TurnstileResponse { get; set; } | ||
[Required(AllowEmptyStrings = false)] | ||
public required string Password { get; set; } | ||
|
||
[Required(AllowEmptyStrings = false)] | ||
public required string Email { get; set; } | ||
|
||
[Required(AllowEmptyStrings = false)] | ||
public required string TurnstileResponse { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
namespace OpenShock.API.Models.Requests; | ||
using System.ComponentModel.DataAnnotations; | ||
using OpenShock.Common.Constants; | ||
|
||
namespace OpenShock.API.Models.Requests; | ||
|
||
public sealed class ShareLinkCreate | ||
{ | ||
[Required(AllowEmptyStrings = false)] | ||
[StringLength(HardLimits.ShockerShareLinkNameMaxLength, MinimumLength = HardLimits.ShockerShareLinkNameMinLength)] | ||
public required string Name { get; set; } | ||
public DateTime? ExpiresOn { get; set; } = null; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
using System.ComponentModel.DataAnnotations; | ||
using OpenShock.Common.DataAnnotations; | ||
using OpenShock.Common.DataAnnotations; | ||
|
||
namespace OpenShock.API.Models.Requests; | ||
|
||
public sealed class SignUpV2 | ||
{ | ||
[Username(true)] | ||
public required string Username { get; set; } | ||
[StringLength(256, MinimumLength = 12)] | ||
|
||
[Password(true)] | ||
public required string Password { get; set; } | ||
[EmailAddress] | ||
|
||
[EmailAddress(true)] | ||
public required string Email { get; set; } | ||
[Required(AllowEmptyStrings = false)] public required string TurnstileResponse { get; set; } | ||
|
||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = false)] | ||
public required string TurnstileResponse { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
using OpenShock.Common; | ||
using System.ComponentModel.DataAnnotations; | ||
using OpenShock.Common.Constants; | ||
|
||
namespace OpenShock.API.Models.Response; | ||
|
||
public sealed class ShockerLimits | ||
{ | ||
[Range(Constants.MinControlIntensity, Constants.MaxControlIntensity)] | ||
[Range(HardLimits.MinControlIntensity, HardLimits.MaxControlIntensity)] | ||
public required byte? Intensity { get; set; } | ||
|
||
[Range(Constants.MinControlDuration, Constants.MaxControlDuration)] | ||
[Range(HardLimits.MinControlDuration, HardLimits.MaxControlDuration)] | ||
public required ushort? Duration { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.