Popravki, dokumentiranje
parent
6719acdb8e
commit
f775e7131f
|
@ -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 = []) {
|
public function request($url, $opts = []) {
|
||||||
$uri = "{$this->baseUrl}/" . self::API_VERSION . '/' . explode('?', $url)[0];
|
$uri = "{$this->baseUrl}/" . self::API_VERSION . '/' . explode('?', $url)[0];
|
||||||
|
|
|
@ -36,6 +36,8 @@ class EtherpadApiController extends ControllerBase {
|
||||||
$data = array_merge($request->query->all(), $request->request->all());
|
$data = array_merge($request->query->all(), $request->request->all());
|
||||||
if ($data['padID']) {
|
if ($data['padID']) {
|
||||||
// @TODO prefix v config!
|
// @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'];
|
$data['padID'] = 'yufu-' . $data['padID'];
|
||||||
}
|
}
|
||||||
$opts = ['form_params' => $data];
|
$opts = ['form_params' => $data];
|
||||||
|
|
|
@ -206,14 +206,14 @@ parameters:
|
||||||
# for more information about the topic in general.
|
# for more information about the topic in general.
|
||||||
# Note: By default the configuration is disabled.
|
# Note: By default the configuration is disabled.
|
||||||
cors.config:
|
cors.config:
|
||||||
enabled: false
|
enabled: true
|
||||||
# Specify allowed headers, like 'x-allowed-header'.
|
# Specify allowed headers, like 'x-allowed-header'.
|
||||||
allowedHeaders: []
|
allowedHeaders: []
|
||||||
# Specify allowed request methods, specify ['*'] to allow all possible ones.
|
# Specify allowed request methods, specify ['*'] to allow all possible ones.
|
||||||
allowedMethods: []
|
allowedMethods: []
|
||||||
# Configure requests allowed from specific origins. Do not include trailing
|
# Configure requests allowed from specific origins. Do not include trailing
|
||||||
# slashes with URLs.
|
# slashes with URLs.
|
||||||
allowedOrigins: ['*']
|
allowedOrigins: ['yufu.kompot.si', 'localhost']
|
||||||
# Sets the Access-Control-Expose-Headers header.
|
# Sets the Access-Control-Expose-Headers header.
|
||||||
exposedHeaders: false
|
exposedHeaders: false
|
||||||
# Sets the Access-Control-Max-Age header.
|
# Sets the Access-Control-Max-Age header.
|
||||||
|
|
Loading…
Reference in New Issue