changed config to token instead of api key
This commit is contained in:
parent
a8601314e7
commit
74dd5d0170
|
@ -1,13 +1,14 @@
|
||||||
<?php
|
<?php
|
||||||
$kagi_api_key = FreshRSS_Context::$user_conf->kagi_api_key;
|
$kagi_token = FreshRSS_Context::$user_conf->kagi_token;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<form action="<?php echo _url('extension', 'configure', 'e', urlencode($this->getName())); ?>" method="post">
|
<form action="<?php echo _url('extension', 'configure', 'e', urlencode($this->getName())); ?>" method="post">
|
||||||
<input type="hidden" name="_csrf" value="<?php echo FreshRSS_Auth::csrfToken(); ?>" />
|
<input type="hidden" name="_csrf" value="<?php echo FreshRSS_Auth::csrfToken(); ?>" />
|
||||||
|
<p><?php echo _t('ext.kagiSummarizer.configure.kagi_token_help'); ?></p>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="group-name" for="kagi_api_key"><?php echo _t('ext.kagiSummarizer.configure.kagi_api_key'); ?></label>
|
<label class="group-name" for="kagi_token"><?php echo _t('ext.kagiSummarizer.configure.kagi_token'); ?></label>
|
||||||
<div class="group-controls">
|
<div class="group-controls">
|
||||||
<input type="text" name="kagi_api_key" id="kagi_api_key" value="<?php echo $kagi_api_key; ?>">
|
<input type="text" name="kagi_token" id="kagi_token" value="<?php echo $kagi_token; ?>">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group form-actions">
|
<div class="form-group form-actions">
|
||||||
|
|
|
@ -16,7 +16,7 @@ class KagiSummarizerExtension extends Minz_Extension {
|
||||||
$this->registerTranslates();
|
$this->registerTranslates();
|
||||||
|
|
||||||
if (Minz_Request::isPost()) {
|
if (Minz_Request::isPost()) {
|
||||||
FreshRSS_Context::$user_conf->kagi_api_key = Minz_Request::param('kagi_api_key', '');
|
FreshRSS_Context::$user_conf->kagi_token = Minz_Request::param('kagi_token', '');
|
||||||
FreshRSS_Context::$user_conf->save();
|
FreshRSS_Context::$user_conf->save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
return array(
|
return array(
|
||||||
'kagiSummarizer' => array(
|
'kagiSummarizer' => array(
|
||||||
'configure' => array(
|
'configure' => array(
|
||||||
'kagi_api_key' => 'Kagi API Key'
|
'kagi_token' => 'Kagi Token',
|
||||||
|
'kagi_token_help' => 'Copy and paste the "Session Link" from you <a href="https://kagi.com/settings?p=user_details" target="_blank">Kagi Account</a> settings.'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue