CapPaste: Support expiration for posting, as a max_age parameter
This commit is contained in:
parent
a9220c96af
commit
f63180c187
10 changed files with 71 additions and 27 deletions
|
|
@ -64,7 +64,7 @@ class ICapPaste(IBaseCap):
|
|||
"""
|
||||
raise NotImplementedError()
|
||||
|
||||
def can_post(self, public=None):
|
||||
def can_post(self, public=None, max_age=None):
|
||||
"""
|
||||
Checks if the paste can be pasted by this backend.
|
||||
Some properties are considered required (public/private, max_age) while others
|
||||
|
|
@ -89,7 +89,7 @@ class ICapPaste(IBaseCap):
|
|||
"""
|
||||
raise NotImplementedError()
|
||||
|
||||
def post_paste(self, _id):
|
||||
def post_paste(self, paste, max_age=None):
|
||||
"""
|
||||
Post a paste.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue