mirror of
https://github.com/rr-/szurubooru.git
synced 2025-07-17 08:26:24 +00:00
14 lines
477 B
Python
14 lines
477 B
Python
from szurubooru import search
|
|
from szurubooru.api.base_api import BaseApi
|
|
from szurubooru.func import auth, snapshots
|
|
|
|
class SnapshotListApi(BaseApi):
|
|
def __init__(self):
|
|
super().__init__()
|
|
self._search_executor = search.SearchExecutor(search.SnapshotSearchConfig())
|
|
|
|
def get(self, ctx):
|
|
auth.verify_privilege(ctx.user, 'snapshots:list')
|
|
return self._search_executor.execute_and_serialize(
|
|
ctx, snapshots.serialize_snapshot)
|