Fix new snip error with git repo
Allow simple raw rendering (in html)
This commit is contained in:
@ -19,6 +19,7 @@ class SnipService
|
||||
{
|
||||
$git = new Git();
|
||||
$repoPath = sprintf('%s/%s', $snipBasePath, $snip->getId());
|
||||
dump($repoPath, $snip);
|
||||
if (!is_dir($repoPath)) {
|
||||
$this->repo = $git->init($repoPath);
|
||||
} else {
|
||||
@ -38,6 +39,7 @@ class SnipService
|
||||
|
||||
public function update(string $snipContents): void
|
||||
{
|
||||
dump($this->getSnipPath());
|
||||
file_put_contents($this->getSnipPath(), $snipContents);
|
||||
$this->repo->addFile('snip.txt');
|
||||
if ($this->repo->hasChanges()) {
|
||||
|
Reference in New Issue
Block a user