mirror of
https://github.com/hrfee/jfa-go.git
synced 2025-01-06 08:20:11 +00:00
Compare commits
No commits in common. "51b59ae103bffa1e052bab12ee9705cbfacc0bd8" and "d19f7d6b53a145e748405e3ac833e57674251993" have entirely different histories.
51b59ae103
...
d19f7d6b53
11
api.go
11
api.go
@ -536,8 +536,6 @@ func (app *appContext) newUser(req newUserDTO, confirmed bool) (f errorFunc, suc
|
||||
} else {
|
||||
app.info.Println("Created Ombi user")
|
||||
}
|
||||
} else {
|
||||
app.debug.Printf("Skipping Ombi: Profile \"%s\" was empty", invite.Profile)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2847,15 +2845,6 @@ func (app *appContext) restart(gc *gin.Context) {
|
||||
}
|
||||
}
|
||||
|
||||
// @Summary Returns the last 100 lines of the log.
|
||||
// @Router /log [get]
|
||||
// @Success 200 {object} LogDTO
|
||||
// @Security Bearer
|
||||
// @tags Other
|
||||
func (app *appContext) GetLog(gc *gin.Context) {
|
||||
gc.JSON(200, LogDTO{lineCache.String()})
|
||||
}
|
||||
|
||||
// no need to syscall.exec anymore!
|
||||
func (app *appContext) Restart() error {
|
||||
if TRAY {
|
||||
|
1
email.go
1
email.go
@ -614,6 +614,7 @@ func (emailer *Emailer) deletedValues(reason string, app *appContext, noSub bool
|
||||
template["reason"] = reason
|
||||
template["message"] = app.config.Section("messages").Key("message").String()
|
||||
}
|
||||
fmt.Println("TTTT", template)
|
||||
return template
|
||||
}
|
||||
|
||||
|
@ -71,12 +71,6 @@
|
||||
<pre class="monospace">{{ .license }}</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div id="modal-logs" class="modal">
|
||||
<div class="modal-content wide content card">
|
||||
<span class="heading">{{ .strings.logs }}<span class="modal-close">×</span></span>
|
||||
<pre class="monospace" id="log-area"></pre>
|
||||
</div>
|
||||
</div>
|
||||
<div id="modal-modify-user" class="modal">
|
||||
<form class="modal-content card" id="form-modify-user" href="">
|
||||
<span class="heading"><span id="header-modify-user"></span> <span class="modal-close">×</span></span>
|
||||
@ -641,7 +635,6 @@
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
<span class="button ~info !normal" id="settings-logs">{{ .strings.logs }}</span>
|
||||
<span class="button ~neutral !normal" id="settings-restart">{{ .strings.settingsRestart }}</span>
|
||||
<span class="button ~urge !normal unfocused" id="settings-save">{{ .strings.settingsSave }}</span>
|
||||
</div>
|
||||
|
@ -48,7 +48,6 @@
|
||||
"profile": "Profile",
|
||||
"unknown": "Unknown",
|
||||
"label": "Label",
|
||||
"logs": "Logs",
|
||||
"announce": "Announce",
|
||||
"templates": "Templates",
|
||||
"subject": "Subject",
|
||||
|
@ -341,7 +341,3 @@ type InternalPWR struct {
|
||||
ID string `json:"id"`
|
||||
Expiry time.Time `json:"expiry"`
|
||||
}
|
||||
|
||||
type LogDTO struct {
|
||||
Log string `json:"log"`
|
||||
}
|
||||
|
@ -180,7 +180,6 @@ func (app *appContext) loadRoutes(router *gin.Engine) {
|
||||
api.GET(p+"/config", app.GetConfig)
|
||||
api.POST(p+"/config", app.ModifyConfig)
|
||||
api.POST(p+"/restart", app.restart)
|
||||
api.GET(p+"/logs", app.GetLog)
|
||||
if telegramEnabled || discordEnabled || matrixEnabled {
|
||||
api.GET(p+"/telegram/pin", app.TelegramGetPin)
|
||||
api.GET(p+"/telegram/verified/:pin", app.TelegramVerified)
|
||||
|
@ -87,8 +87,6 @@ window.availableProfiles = window.availableProfiles || [];
|
||||
|
||||
window.modals.matrix = new Modal(document.getElementById("modal-matrix"));
|
||||
|
||||
window.modals.logs = new Modal(document.getElementById("modal-logs"));
|
||||
|
||||
if (window.telegramEnabled) {
|
||||
window.modals.telegram = new Modal(document.getElementById("modal-telegram"));
|
||||
}
|
||||
|
@ -634,13 +634,6 @@ export class settingsList {
|
||||
}
|
||||
});
|
||||
|
||||
private _showLogs = () => _get("/logs", null, (req: XMLHttpRequest) => {
|
||||
if (req.readyState == 4 && req.status == 200) {
|
||||
(document.getElementById("log-area") as HTMLPreElement).textContent = req.response["log"] as string;
|
||||
window.modals.logs.show();
|
||||
}
|
||||
});
|
||||
|
||||
constructor() {
|
||||
this._sections = {};
|
||||
this._buttons = {};
|
||||
@ -652,7 +645,7 @@ export class settingsList {
|
||||
};
|
||||
this._saveButton.onclick = this._save;
|
||||
document.addEventListener("settings-requires-restart", () => { this._needsRestart = true; });
|
||||
document.getElementById("settings-logs").onclick = this._showLogs;
|
||||
|
||||
const advancedEnableToggle = document.getElementById("settings-advanced-enabled") as HTMLInputElement;
|
||||
advancedEnableToggle.onchange = () => {
|
||||
document.dispatchEvent(new CustomEvent("settings-advancedState", { detail: advancedEnableToggle.checked }));
|
||||
|
@ -107,7 +107,6 @@ declare interface Modals {
|
||||
discord: Modal;
|
||||
matrix: Modal;
|
||||
sendPWR?: Modal;
|
||||
logs: Modal;
|
||||
}
|
||||
|
||||
interface Invite {
|
||||
|
Loading…
Reference in New Issue
Block a user