diff --git a/htdocs/holiday/class/api_holidays.class.php b/htdocs/holiday/class/api_holidays.class.php index 7333c658b23..3356af74979 100644 --- a/htdocs/holiday/class/api_holidays.class.php +++ b/htdocs/holiday/class/api_holidays.class.php @@ -4,6 +4,7 @@ * Copyright (C) 2020-2025 Frédéric France * Copyright (C) 2025 MDW * Copyright (C) 2025 William Mead + * Copyright (C) 2025 Charlene Benke * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -365,7 +366,7 @@ class Holidays extends DolibarrApi throw new RestException(403, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } - $result = $this->holiday->setValidate(DolibarrApiAccess::$user, $notrigger); + $result = $this->holiday->validate(DolibarrApiAccess::$user, $notrigger); if ($result == 0) { throw new RestException(304, 'Error nothing done. May be object is already validated'); } @@ -410,7 +411,7 @@ class Holidays extends DolibarrApi throw new RestException(403, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } - $result = $this->holiday->setApproved(DolibarrApiAccess::$user, $notrigger); + $result = $this->holiday->approve(DolibarrApiAccess::$user, $notrigger); if ($result == 0) { throw new RestException(304, 'Error nothing done. May be object is already approved'); }