mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-10-31 10:38:18 -04:00 
			
		
		
		
	* Added validators for users and recipes provide a simple get api, allowing to test for existence of - user by username - recipe by slug - group by name (not tested yet) * updated formatting * Use group_id+slug for recipes, use ValidationRespone * Fixed Flake8 errors and warnings * add missing field for TestUser init
		
			
				
	
	
		
			17 lines
		
	
	
		
			275 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			275 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| from dataclasses import dataclass
 | |
| from typing import Any
 | |
| from uuid import UUID
 | |
| 
 | |
| 
 | |
| @dataclass
 | |
| class TestUser:
 | |
|     email: str
 | |
|     user_id: UUID
 | |
|     username: str
 | |
|     _group_id: UUID
 | |
|     token: Any
 | |
| 
 | |
|     @property
 | |
|     def group_id(self) -> str:
 | |
|         return str(self._group_id)
 |