feat: flag management
This commit is contained in:
		
							parent
							
								
									8bd4449804
								
							
						
					
					
						commit
						d9d48c3cbf
					
				
					 24 changed files with 615 additions and 235 deletions
				
			
		|  | @ -83,7 +83,8 @@ public class MemberRendererService(DatabaseContext db, Config config) | |||
|             ? $"{config.MediaBaseUrl}/users/{user.Id}/avatars/{user.Avatar}.webp" | ||||
|             : null; | ||||
| 
 | ||||
|     private string ImageUrlFor(PrideFlag flag) => $"{config.MediaBaseUrl}/flags/{flag.Hash}.webp"; | ||||
|     private string? ImageUrlFor(PrideFlag flag) => | ||||
|         flag.Hash != null ? $"{config.MediaBaseUrl}/flags/{flag.Hash}.webp" : null; | ||||
| 
 | ||||
|     private PrideFlagResponse RenderPrideFlag(PrideFlag flag) => | ||||
|         new(flag.Id, ImageUrlFor(flag), flag.Name, flag.Description); | ||||
|  |  | |||
|  | @ -131,7 +131,8 @@ public class UserRendererService( | |||
|             ? $"{config.MediaBaseUrl}/users/{user.Id}/avatars/{user.Avatar}.webp" | ||||
|             : null; | ||||
| 
 | ||||
|     public string ImageUrlFor(PrideFlag flag) => $"{config.MediaBaseUrl}/flags/{flag.Hash}.webp"; | ||||
|     public string? ImageUrlFor(PrideFlag flag) => | ||||
|         flag.Hash != null ? $"{config.MediaBaseUrl}/flags/{flag.Hash}.webp" : null; | ||||
| 
 | ||||
|     public PrideFlagResponse RenderPrideFlag(PrideFlag flag) => | ||||
|         new(flag.Id, ImageUrlFor(flag), flag.Name, flag.Description); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue