nodebb-plugin-sso-biogrenci 2.0.6 → 2.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/library.js
CHANGED
|
@@ -21,12 +21,12 @@ plugin.init = async function (params) {
|
|
|
21
21
|
const { router, middleware } = params;
|
|
22
22
|
winston.info(`${LOG_PREFIX} Initializing...`);
|
|
23
23
|
|
|
24
|
-
//
|
|
25
|
-
router.get('/
|
|
26
|
-
router.get('/api/
|
|
24
|
+
// Firsat page
|
|
25
|
+
router.get('/firsat', middleware.buildHeader, renderFirsatlar);
|
|
26
|
+
router.get('/api/firsat', renderFirsatlar);
|
|
27
27
|
|
|
28
28
|
// API proxy: fetch opportunities
|
|
29
|
-
router.get('/api/biogrenci/
|
|
29
|
+
router.get('/api/biogrenci/firsat', async (req, res) => {
|
|
30
30
|
try {
|
|
31
31
|
const data = await fetchOpportunities(req.query);
|
|
32
32
|
res.json(data);
|
|
@@ -40,7 +40,7 @@ plugin.init = async function (params) {
|
|
|
40
40
|
router.get('/admin/plugins/biogrenci', middleware.admin.buildHeader, renderAdmin);
|
|
41
41
|
router.get('/api/admin/plugins/biogrenci', renderAdmin);
|
|
42
42
|
|
|
43
|
-
winston.info(`${LOG_PREFIX} Ready — /
|
|
43
|
+
winston.info(`${LOG_PREFIX} Ready — /firsat`);
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
async function renderFirsatlar(req, res) {
|
package/package.json
CHANGED
package/static/lib/admin.js
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
define('admin/plugins/biogrenci', ['settings'], function (Settings) {
|
|
3
|
+
define('admin/plugins/biogrenci', ['settings', 'alerts'], function (Settings, alerts) {
|
|
4
4
|
var ACP = {};
|
|
5
5
|
|
|
6
6
|
ACP.init = function () {
|
|
7
|
-
|
|
8
|
-
// settings loaded
|
|
9
|
-
});
|
|
7
|
+
Settings.load('biogrenci', $('#biogrenci-settings'));
|
|
10
8
|
|
|
11
9
|
$('#save').on('click', function () {
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
Settings.save('biogrenci', $('#biogrenci-settings'), function () {
|
|
11
|
+
alerts.alert({
|
|
14
12
|
type: 'success',
|
|
15
13
|
alert_id: 'biogrenci-settings-saved',
|
|
16
14
|
title: 'Ayarlar Kaydedildi',
|
|
@@ -65,7 +65,7 @@ define('forum/biogrenci-firsatlar', [], function () {
|
|
|
65
65
|
if (state.type) p.set('type', state.type);
|
|
66
66
|
if (state.search) p.set('search', state.search);
|
|
67
67
|
|
|
68
|
-
fetch(config.relative_path + '/api/biogrenci/
|
|
68
|
+
fetch(config.relative_path + '/api/biogrenci/firsat?' + p.toString())
|
|
69
69
|
.then(function (r) { return r.json(); })
|
|
70
70
|
.then(function (res) {
|
|
71
71
|
if (res.error) { empty(res.error); return; }
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<div class="panel-body">
|
|
6
6
|
<div class="alert alert-info">
|
|
7
7
|
<i class="fa fa-info-circle"></i> Bu plugin bi'öğrenci partner API'sinden öğrenci fırsatlarını çeker ve forumda gösterir.
|
|
8
|
-
Fırsatlar sayfası: <a href="/
|
|
8
|
+
Fırsatlar sayfası: <a href="/firsat" target="_blank"><strong>/firsat</strong></a>
|
|
9
9
|
</div>
|
|
10
10
|
|
|
11
11
|
<form id="biogrenci-settings">
|