shorten join url

pull/9/head
sualko 2020-04-26 13:35:35 +02:00
parent 463e29c321
commit 6f2dac8b0b
3 changed files with 4 additions and 4 deletions

View File

@ -5,7 +5,7 @@ return [
'room_api' => ['url' => '/api/0.1/rooms']
],
'routes' => [
['name' => 'join#index', 'url' => '/b/{token}', 'verb' => 'GET'],
['name' => 'join#index', 'url' => '/{token}', 'verb' => 'GET', 'requirements' => array('token' => '\w[16,]')],
['name' => 'room_api#preflighted_cors', 'url' => '/api/0.1/{path}',
'verb' => 'OPTIONS', 'requirements' => ['path' => '.+']]
]

View File

@ -73,12 +73,12 @@ const RoomRow: React.FC<Props> = (props) => {
return (
<tr key={room.id}>
<td className="share icon-col">
<CopyToClipboard text={window.location.origin + api.getUrl(`b/${room.uid}`)}>
<CopyToClipboard text={window.location.origin + api.getUrl(`${room.uid}`)}>
<span className="icon icon-clippy icon-visible copy-to-clipboard" ></span>
</CopyToClipboard>
</td>
<td className="start icon-col">
<a href={api.getUrl(`b/${room.uid}`)} className="icon icon-play icon-visible" target="_blank" rel="noopener noreferrer"></a>
<a href={api.getUrl(`${room.uid}`)} className="icon icon-play icon-visible" target="_blank" rel="noopener noreferrer"></a>
</td>
<td className="name">
{edit('name')}

View File

@ -51,7 +51,7 @@ $(() => {
async function share(path: string, filename: string, roomUid) {
const id = await createShare(path);
const shareUrl = await configureShare(id);
const joinUrl = generateUrl('/apps/bbb/b/{uid}?u={url}&filename={filename}', {
const joinUrl = generateUrl('/apps/bbb/{uid}?u={url}&filename={filename}', {
uid: roomUid,
url: shareUrl + '/download',
filename