Popravki, dokumentiranje

pull/42/head
Jurij Podgoršek 2024-01-23 22:37:16 +01:00 committed by Lio Novelli
parent df89a76305
commit ddcd40b56b
3 changed files with 6 additions and 3 deletions

View File

@ -46,7 +46,8 @@ class Client {
}
/**
* Method description.
* Poizvedi na etherpadov API. Doda baseURL in verzijo pred zeljen url, doda
* API ključ in uredi parametre. Vendo je POST!
*/
public function request($url, $opts = []) {
$uri = "{$this->baseUrl}/" . self::API_VERSION . '/' . explode('?', $url)[0];

View File

@ -36,6 +36,8 @@ class EtherpadApiController extends ControllerBase {
$data = array_merge($request->query->all(), $request->request->all());
if ($data['padID']) {
// @TODO prefix v config!
// Zahtevnejše ampak lepše bi bilo pa uporabit group API:
// https://etherpad.org/doc/v1.8.4/#index_creategroup
$data['padID'] = 'yufu-' . $data['padID'];
}
$opts = ['form_params' => $data];

View File

@ -206,14 +206,14 @@ parameters:
# for more information about the topic in general.
# Note: By default the configuration is disabled.
cors.config:
enabled: false
enabled: true
# Specify allowed headers, like 'x-allowed-header'.
allowedHeaders: []
# Specify allowed request methods, specify ['*'] to allow all possible ones.
allowedMethods: []
# Configure requests allowed from specific origins. Do not include trailing
# slashes with URLs.
allowedOrigins: ['*']
allowedOrigins: ['yufu.kompot.si', 'localhost']
# Sets the Access-Control-Expose-Headers header.
exposedHeaders: false
# Sets the Access-Control-Max-Age header.