mirror of
https://github.com/r4sas/recastin-panel
synced 2025-03-12 13:21:14 +00:00
Added channelName column, needed for Chat integration
This commit is contained in:
parent
f8cf7db0bf
commit
aac20784cc
5
.gitignore
vendored
5
.gitignore
vendored
@ -23,4 +23,7 @@ yarn-error.log
|
||||
###< symfony/web-server-bundle ###
|
||||
|
||||
.idea
|
||||
/config/jwt
|
||||
|
||||
###> lexik/jwt-authentication-bundle ###
|
||||
/config/jwt/*.pem
|
||||
###< lexik/jwt-authentication-bundle ###
|
||||
|
@ -36,6 +36,8 @@
|
||||
|
||||
<fg-input label="Stream-Key" v-model="endpoint.streamKey"></fg-input>
|
||||
|
||||
<fg-input label="Channel Name" v-model="endpoint.channelName"></fg-input>
|
||||
|
||||
<button class="btn btn-primary">Save</button>
|
||||
</form>
|
||||
</card>
|
||||
@ -61,6 +63,7 @@
|
||||
type: 'Mixer',
|
||||
server: '',
|
||||
streamKey: '',
|
||||
channelName: '',
|
||||
},
|
||||
services: {},
|
||||
serviceNames: []
|
||||
|
@ -23,7 +23,7 @@ const router = new VueRouter({
|
||||
});
|
||||
|
||||
Vue.router = router;
|
||||
axios.defaults.baseURL = typeof appUrl === 'undefined' ? `http://streamer.miku/api` : appUrl;
|
||||
axios.defaults.baseURL = typeof appUrl === 'undefined' ? `http://localhost/api` : appUrl;
|
||||
|
||||
Vue.use(VueAxios, axios);
|
||||
Vue.use(VueNotify);
|
||||
|
@ -250,6 +250,7 @@ class Streams extends Controller
|
||||
$endpoint->setType($requestBody['type']);
|
||||
$endpoint->setServer($requestBody['server']);
|
||||
$endpoint->setStreamKey($requestBody['streamKey']);
|
||||
$endpoint->setChannelName($requestBody['channelName']);
|
||||
$endpoint->setStream($stream);
|
||||
|
||||
$manager = $this->get('doctrine.orm.entity_manager');
|
||||
|
@ -51,6 +51,12 @@ class Endpoint implements \JsonSerializable
|
||||
*/
|
||||
private $streamKey;
|
||||
|
||||
/**
|
||||
* @ORM\Column(name="channelName", type="string", length=255)
|
||||
* @var string
|
||||
*/
|
||||
private $channelName;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="App\Entity\Streams", inversedBy="endpoints")
|
||||
* @ORM\JoinColumn(name="stream_id", referencedColumnName="id")
|
||||
@ -185,6 +191,24 @@ class Endpoint implements \JsonSerializable
|
||||
$this->stream = $stream;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
* @author Soner Sayakci <shyim@posteo.de>
|
||||
*/
|
||||
public function getChannelName(): string
|
||||
{
|
||||
return $this->channelName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $channelName
|
||||
* @author Soner Sayakci <shyim@posteo.de>
|
||||
*/
|
||||
public function setChannelName(string $channelName): void
|
||||
{
|
||||
$this->channelName = $channelName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @ORM\PostPersist()
|
||||
* @ORM\PostUpdate()
|
||||
|
30
src/Migrations/Version20180509192256.php
Normal file
30
src/Migrations/Version20180509192256.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20180509192256 extends AbstractMigration
|
||||
{
|
||||
public function up(Schema $schema) : void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
|
||||
|
||||
$this->addSql('ALTER TABLE user CHANGE role role VARCHAR(255) DEFAULT \'user\' NOT NULL');
|
||||
$this->addSql('ALTER TABLE endpoint ADD channelName VARCHAR(255) NOT NULL, CHANGE stream_id stream_id INT DEFAULT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema) : void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
|
||||
|
||||
$this->addSql('ALTER TABLE endpoint DROP channelName, CHANGE stream_id stream_id INT DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE user CHANGE role role VARCHAR(255) DEFAULT \'\'user\'\' NOT NULL COLLATE utf8mb4_unicode_ci');
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user