AtmoType is a font sharing website through ATProto.

Revert "[be] add example endpoint"

This reverts commit 7b5bc202db5f31b7e3fef198468afca61b8fac4a.

(yeah fastendpoints doesn't fit atproto so I decided to make my own)

Changed files
+1 -58
AtmoType
-1
AtmoType/AtmoType.csproj
··· 7 7 </PropertyGroup> 8 8 9 9 <ItemGroup> 10 - <PackageReference Include="FastEndpoints" Version="7.1.1" /> 11 10 <PackageReference Include="FishyFlip" Version="4.2.0" /> 12 11 </ItemGroup> 13 12
-24
AtmoType/Endpoints/Example/Example.cs
··· 1 - namespace AtmoType.Endpoints.Example; 2 - 3 - public class ExampleRequest 4 - { 5 - public string? Name { get; set; } 6 - } 7 - 8 - public class ExampleResponse 9 - { 10 - public string Hello { get; set; } = string.Empty; 11 - } 12 - 13 - public class Example : XrpcQuery<ExampleRequest, ExampleResponse> 14 - { 15 - public override string Nsid => "win.atmotype.example.example"; 16 - 17 - public override async Task<ExampleResponse> ExecuteAsync(ExampleRequest req, CancellationToken ct) 18 - { 19 - return new ExampleResponse 20 - { 21 - Hello = "world" 22 - }; 23 - } 24 - }
+1 -4
AtmoType/Program.cs
··· 1 - using FastEndpoints; 2 - 3 1 var builder = WebApplication.CreateBuilder(args); 4 - builder.Services.AddFastEndpoints(); 5 2 var app = builder.Build(); 6 3 7 - app.UseFastEndpoints(); 8 4 app.MapGet("/", () => "Hello World!"); 5 + 9 6 app.Run();
-29
AtmoType/XrpcBase.cs
··· 1 - using FastEndpoints; 2 - 3 - namespace AtmoType; 4 - 5 - public abstract class XrpcQuery<TRequest, TResponse> : Endpoint<TRequest, TResponse> 6 - where TRequest : notnull 7 - where TResponse : notnull 8 - { 9 - public abstract string Nsid { get; } 10 - 11 - public override void Configure() 12 - { 13 - Get($"/xrpc/{Nsid}"); 14 - AllowAnonymous(); // TODO: Better auth support 15 - } 16 - } 17 - 18 - public abstract class XrpcProcedure<TRequest, TResponse> : Endpoint<TRequest, TResponse> 19 - where TRequest : notnull 20 - where TResponse : notnull 21 - { 22 - public abstract string Nsid { get; } 23 - 24 - public override void Configure() 25 - { 26 - Post($"/xrpc/{Nsid}"); 27 - AllowAnonymous(); // TODO: Better auth support 28 - } 29 - }