新修改

This commit is contained in:
wuyifan 2024-06-27 20:31:45 +08:00
parent 8c17334f94
commit 01243d63b0
3 changed files with 1 additions and 27 deletions

View File

@ -1,7 +1,7 @@
# wuyifan-ob-reposyncer
我试试新功能,加了点东西
我试试新功能
修改的内容
新增
更多文件内容

26
auth.py
View File

@ -1,26 +0,0 @@
from typing import List, Union, Optional, Dict
from typing import Any
from fastapi import (
Body
)
from src.utils.logger import logger
from pydantic.main import BaseModel
from sqlalchemy import text
from .service import Service
from src.dto.auth import AuthItem
from src.common.repo import RepoType
from src.utils import github, gitee
class AuthService(Service):
def __init__(self) -> None:
pass
def auth(self, item: AuthItem) -> bool:
if item.type == RepoType.Github:
return github.github_auth(item.token)
elif item.type == RepoType.Gitee:
return gitee.gitee_auth(item.token)
else:
return False

0
docx.docx Normal file
View File