mirror of
https://github.com/opensupports/opensupports.git
synced 2025-07-31 01:35:15 +02:00
commit
2adc708045
9
build.sh
9
build.sh
@ -4,8 +4,10 @@ gulp prod --api
|
|||||||
rm build/index.html
|
rm build/index.html
|
||||||
echo "2/3 Creating api folder..."
|
echo "2/3 Creating api folder..."
|
||||||
cd ../server
|
cd ../server
|
||||||
rm -rf files
|
mkdir files2
|
||||||
mkdir files
|
mv files/.htaccess files2
|
||||||
|
rm -rf files/
|
||||||
|
mv files2 files
|
||||||
cd ..
|
cd ..
|
||||||
mkdir api
|
mkdir api
|
||||||
cp server/index.php api
|
cp server/index.php api
|
||||||
@ -17,8 +19,7 @@ cp -R server/data api
|
|||||||
cp -R server/libs api
|
cp -R server/libs api
|
||||||
cp -R server/models api
|
cp -R server/models api
|
||||||
cp -R server/vendor api
|
cp -R server/vendor api
|
||||||
mkdir api/files
|
cp -R server/files api
|
||||||
touch api/files/.keep
|
|
||||||
echo -n > api/config.php
|
echo -n > api/config.php
|
||||||
chmod -R 755 .
|
chmod -R 755 .
|
||||||
echo "3/3 Generating zip..."
|
echo "3/3 Generating zip..."
|
||||||
|
@ -24,7 +24,7 @@ use Respect\Validation\Validator as DataValidator;
|
|||||||
* @apiUse INVALID_SUBJECT
|
* @apiUse INVALID_SUBJECT
|
||||||
* @apiUse INVALID_BODY
|
* @apiUse INVALID_BODY
|
||||||
*
|
*
|
||||||
* @apiSuccess {Object} data Empty object
|
* @apiSuccess {Object} data Empty object
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -60,18 +60,16 @@ class EditMailTemplateController extends Controller {
|
|||||||
$language = Controller::request('language');
|
$language = Controller::request('language');
|
||||||
$templateType = Controller::request('templateType');
|
$templateType = Controller::request('templateType');
|
||||||
$subject = Controller::request('subject', true);
|
$subject = Controller::request('subject', true);
|
||||||
$body = Controller::request('body', true);
|
$body = Controller::request('body');
|
||||||
|
|
||||||
$mailTemplate = MailTemplate::findOne(' language = ? AND type = ?', [$language, $templateType]);
|
$mailTemplate = MailTemplate::findOne(' language = ? AND type = ?', [$language, $templateType]);
|
||||||
if($mailTemplate->isNull()) {
|
if($mailTemplate->isNull()) {
|
||||||
Response::respondError(ERRORS::INVALID_TEMPLATE);
|
throw new Exception(ERRORS::INVALID_TEMPLATE);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
$mailTemplate->subject = $subject;
|
$mailTemplate->subject = $subject;
|
||||||
$mailTemplate->body = $body;
|
$mailTemplate->body = $body;
|
||||||
$mailTemplate->store();
|
$mailTemplate->store();
|
||||||
|
|
||||||
Response::respondSuccess();
|
Response::respondSuccess();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user