mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-23 09:52:22 +00:00
adds insertFile to the new ProfilUpdate FhcAPIController and starts a transaction when deleting the foreign key from the profil update and deleting the old file
This commit is contained in:
@@ -77,6 +77,21 @@ class Profil_update_model extends DB_Model
|
||||
|
||||
}
|
||||
|
||||
//? remove File from the Profil Update
|
||||
public function removeFileFromProfilUpdate($dms_id)
|
||||
{
|
||||
|
||||
if(!is_int($dms_id) || $dms_id < 0){
|
||||
return error("not valid dms_id");
|
||||
}
|
||||
|
||||
return $this->execReadOnlyQuery("
|
||||
UPDATE public.tbl_profil_update
|
||||
SET attachment_id = NULL
|
||||
WHERE attachment_id = ?", [$dms_id]);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getProfilUpdateWithPermission
|
||||
|
||||
Reference in New Issue
Block a user