Skip to content

Commit df5c28d

Browse files
feature(#22): this commit introduces a “secret mapper” with an extension method to convert domain objects
1 parent 34ee80c commit df5c28d

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

  • Applications/Backend/Source/HttpsRichardy.Federation.Application/Mappers
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
namespace HttpsRichardy.Federation.Application.Mappers;
2+
3+
public static class SecretMapper
4+
{
5+
public static SecretScheme AsResponse(this Secret secret) => new()
6+
{
7+
Id = secret.Id,
8+
CreatedAt = secret.CreatedAt,
9+
ExpiresAt = secret.ExpiresAt,
10+
GracePeriodEndsAt = secret.GracePeriodEndsAt
11+
};
12+
}

0 commit comments

Comments
 (0)