mirror of
https://github.com/PaiGramTeam/PamGram.git
synced 2024-11-16 12:02:16 +00:00
3ec99cc3b8
✨修复 `quiz` 模块问题并添加验证群验证插件
15 lines
434 B
Python
15 lines
434 B
Python
from utils.mysql import MySQL
|
|
from utils.redisdb import RedisDB
|
|
from utils.service.manager import listener_service
|
|
from .cache import QuizCache
|
|
from .repositories import QuizRepository
|
|
from .services import QuizService
|
|
|
|
|
|
@listener_service()
|
|
def create_quiz_service(mysql: MySQL, redis: RedisDB):
|
|
_repository = QuizRepository(mysql)
|
|
_cache = QuizCache(redis)
|
|
_service = QuizService(_repository, _cache)
|
|
return _service
|