Skip to content
Snippets Groups Projects
Verified Commit 30b64306 authored by Andrej Ramašeuski's avatar Andrej Ramašeuski
Browse files

Generator jitsi url

parent 23da1a57
No related branches found
No related tags found
No related merge requests found
Pipeline #1984 passed
...@@ -3,7 +3,7 @@ image: docker:19.03.1 ...@@ -3,7 +3,7 @@ image: docker:19.03.1
variables: variables:
DOCKER_TLS_CERTDIR: "/certs" DOCKER_TLS_CERTDIR: "/certs"
IMAGE_TAG: $CI_REGISTRY_IMAGE IMAGE_TAG: $CI_REGISTRY_IMAGE
IMAGE_VER: 1.3.0 IMAGE_VER: 1.4.0
services: services:
- docker:19.03.1-dind - docker:19.03.1-dind
......
package CF::Controller::Jitsi;
use Mojo::Base 'Mojolicious::Controller';
use feature 'signatures';
no warnings qw{ experimental::signatures };
sub url ($c) {
$c->openapi->valid_input or return;
my $args = $c->req->json;
$c->render(
status => 200,
openapi => {
url => $c->jitsi_url(
$args->{room} // $c->cfg->{jitsi_room},
$args->{token_lifetime} // $c->cfg->{jitsi_token_lifetime},
%{ $args },
)
},
);
};
1;
openapi: 3.0.3 openapi: 3.0.3
info: info:
version: 0.1.0 version: 1.4.0
title: CF Online title: CF Online
description: CF Online description: CF Online
license: license:
...@@ -588,3 +588,41 @@ paths: ...@@ -588,3 +588,41 @@ paths:
204: 204:
description: Status changed description: Status changed
/jitsi/url:
post:
x-mojo-to: jitsi#url
security:
- Bearer: ['chairman']
tags:
- jitsi
summary: "Vygenerovat odkaz pro jitsi"
operationId: jitsiUrl
requestBody:
content:
application/json:
schema:
type: object
properties:
name:
type: string
email:
type: string
avatar:
type: string
room:
type: string
token_lifetime:
type: integer
required:
- name
responses:
200:
description: Jitsi url
content:
application/json:
schema:
type: object
properties:
url:
type: string
description: Jitsi meet url
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment