mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 19:59:50 +08:00
db43ed6f41
Co-authored-by: takatost <takatost@gmail.com>
18 lines
381 B
Python
18 lines
381 B
Python
from flask_restful import fields
|
|
|
|
from libs.helper import TimestampField
|
|
|
|
|
|
class HiddenAPIKey(fields.Raw):
|
|
def output(self, key, obj):
|
|
return obj.api_key[:3] + '***' + obj.api_key[-3:]
|
|
|
|
|
|
api_based_extension_fields = {
|
|
'id': fields.String,
|
|
'name': fields.String,
|
|
'api_endpoint': fields.String,
|
|
'api_key': HiddenAPIKey,
|
|
'created_at': TimestampField
|
|
}
|