feat(auth): include email attribute in auth files response

- Added logic to parse and include the "email" attribute from auth files.
- Updated file data extraction to support additional metadata.
This commit is contained in:
Luis Pater
2025-10-07 15:45:27 +08:00
parent 4bc8a52771
commit 39337627b9

View File

@@ -255,7 +255,9 @@ func (h *Handler) ListAuthFiles(c *gin.Context) {
full := filepath.Join(h.cfg.AuthDir, name)
if data, errRead := os.ReadFile(full); errRead == nil {
typeValue := gjson.GetBytes(data, "type").String()
emailValue := gjson.GetBytes(data, "email").String()
fileData["type"] = typeValue
fileData["email"] = emailValue
}
files = append(files, fileData)