image upload and keep if not changed
This commit is contained in:
parent
be52a51055
commit
5b3a72820a
3 changed files with 17 additions and 9 deletions
|
@ -70,13 +70,13 @@ export async function setSettings<K extends SettingString>(req: Request, res: Re
|
|||
export async function setImages(req: Request, res: Response): Promise<any> {
|
||||
if (req.files && !Array.isArray(req.files) && req.files.icon) {
|
||||
await SettingHelper.setSetting("club.icon", "configured");
|
||||
} else {
|
||||
} else if (req.body["club.icon"] != "keep") {
|
||||
await SettingHelper.resetSetting("club.icon");
|
||||
}
|
||||
|
||||
if (req.files && !Array.isArray(req.files) && req.files.logo) {
|
||||
await SettingHelper.setSetting("club.logo", "configured");
|
||||
} else {
|
||||
} else if (req.body["club.logo"] != "keep") {
|
||||
await SettingHelper.resetSetting("club.logo");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue