mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-16 21:03:29 +00:00
feat: custom data for projects (#1571)
This commit is contained in:
committed by
Carlos Valente
parent
eed6373dbf
commit
696c016c90
@@ -314,17 +314,13 @@ export async function patchCurrentProject(data: Partial<DatabaseModel>) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes the title of a project
|
||||
* it handles invalidating the necessary data
|
||||
* Patches the current project data
|
||||
* Handles deleting the local logo if the logo has been removed
|
||||
*/
|
||||
export async function editCurrentProjectData(newData: Partial<ProjectData>) {
|
||||
const currentProjectData = getDataProvider().getProjectData();
|
||||
const updatedProjectData = await getDataProvider().setProjectData(newData);
|
||||
|
||||
if (currentProjectData.title !== updatedProjectData.title) {
|
||||
// something
|
||||
}
|
||||
|
||||
// Delete the old logo if the logo has been removed
|
||||
if (!updatedProjectData.projectLogo && currentProjectData.projectLogo) {
|
||||
const filePath = join(publicDir.logoDir, currentProjectData.projectLogo);
|
||||
|
||||
Reference in New Issue
Block a user