mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-03 13:00:52 +08:00
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:
@@ -255,7 +255,9 @@ func (h *Handler) ListAuthFiles(c *gin.Context) {
|
|||||||
full := filepath.Join(h.cfg.AuthDir, name)
|
full := filepath.Join(h.cfg.AuthDir, name)
|
||||||
if data, errRead := os.ReadFile(full); errRead == nil {
|
if data, errRead := os.ReadFile(full); errRead == nil {
|
||||||
typeValue := gjson.GetBytes(data, "type").String()
|
typeValue := gjson.GetBytes(data, "type").String()
|
||||||
|
emailValue := gjson.GetBytes(data, "email").String()
|
||||||
fileData["type"] = typeValue
|
fileData["type"] = typeValue
|
||||||
|
fileData["email"] = emailValue
|
||||||
}
|
}
|
||||||
|
|
||||||
files = append(files, fileData)
|
files = append(files, fileData)
|
||||||
|
|||||||
Reference in New Issue
Block a user