mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-22 16:24:26 +01:00
Render hints on server side and don't render them client side (#1564)
* Render hints on the server side inline with challenge descriptions and Pages * Clean up some of the API responses for hints to include the right data * Closes #1563
This commit is contained in:
@@ -6,12 +6,12 @@ class HintSchema(ma.ModelSchema):
|
||||
class Meta:
|
||||
model = Hints
|
||||
include_fk = True
|
||||
dump_only = ("id", "type")
|
||||
dump_only = ("id", "type", "html")
|
||||
|
||||
views = {
|
||||
"locked": ["id", "type", "challenge", "cost"],
|
||||
"unlocked": ["id", "type", "challenge", "content", "cost"],
|
||||
"admin": ["id", "type", "challenge", "content", "cost", "requirements"],
|
||||
"unlocked": ["id", "type", "challenge", "content", "html", "cost"],
|
||||
"admin": ["id", "type", "challenge", "content", "html", "cost", "requirements"],
|
||||
}
|
||||
|
||||
def __init__(self, view=None, *args, **kwargs):
|
||||
|
||||
Reference in New Issue
Block a user