mirror of
				https://github.com/dancojocaru2000/foxbank.git
				synced 2025-10-31 04:46:31 +02:00 
			
		
		
		
	
		
			
				
	
	
		
			12 lines
		
	
	
	
		
			294 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
	
		
			294 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| from http import HTTPStatus
 | |
| from functools import wraps
 | |
| 
 | |
| def no_content(fn):
 | |
|     @wraps(fn)
 | |
|     def wrapper(*args, **kargs):
 | |
|         result = fn(*args, **kargs)
 | |
|         if result is None:
 | |
|             return None, HTTPStatus.NO_CONTENT
 | |
|         else:
 | |
|             return result
 | |
|     return wrapper
 |