fix dead code, typo, and minor bugs in main.go, process.go and index.go (#6167)

Fixes several small issues found during code review:
- fix(xray): return explicit nil instead of stale err in getLogPath
- fix(xray): remove duplicate doc comment on GetErrorLogPath
- refactor: remove unreachable return after log.Fatalf (×4)
- fix(cli): add missing newline to listen IP success message
- fix(cli): typo "form" → "from" in migrate help text
- refactor: simplify var+assign to short declaration for server/subServer
- fix(controller): return error from getTwoFactorEnable instead of swallowing it
This commit is contained in:
Isuru Sampath
2026-07-31 21:57:46 +05:30
committed by GitHub
parent 264f61eb90
commit 31c1eed5dc
3 changed files with 6 additions and 15 deletions
+1 -3
View File
@@ -163,7 +163,5 @@ func (a *IndexController) csrfToken(c *gin.Context) {
// getTwoFactorEnable retrieves the current status of two-factor authentication.
func (a *IndexController) getTwoFactorEnable(c *gin.Context) {
status, err := a.settingService.GetTwoFactorEnable()
if err == nil {
jsonObj(c, status, nil)
}
jsonObj(c, status, err)
}