mirror of
https://github.com/dancojocaru2000/foxbank.git
synced 2025-02-23 08:09:35 +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
|