feat:kintone APIのパスワードの暗号化対応

This commit is contained in:
xiaozhe.ma
2024-08-05 19:26:31 +09:00
parent 48f2c4a2d1
commit 35df63664e
4 changed files with 12 additions and 9 deletions

View File

@@ -266,19 +266,18 @@ def get_domain(db: Session, userid: str):
domains = db.query(models.Domain).join(models.UserDomain,models.UserDomain.domainid == models.Domain.id ).filter(models.UserDomain.userid == userid).all()
if not domains:
raise HTTPException(status_code=404, detail="Data not found")
for domain in domains:
decrypted_pwd = chacha20Decrypt(domain.kintonepwd)
domain.kintonepwd = decrypted_pwd
# for domain in domains:
# decrypted_pwd = chacha20Decrypt(domain.kintonepwd)
# domain.kintonepwd = decrypted_pwd
return domains
def get_domains(db: Session,tenantid:str):
domains = db.query(models.Domain).filter(models.Domain.tenantid == tenantid ).all()
if not domains:
raise HTTPException(status_code=404, detail="Data not found")
for domain in domains:
decrypted_pwd = chacha20Decrypt(domain.kintonepwd)
domain.kintonepwd = decrypted_pwd
# for domain in domains:
# decrypted_pwd = chacha20Decrypt(domain.kintonepwd)
# domain.kintonepwd = decrypted_pwd
return domains
def get_events(db: Session):