Файловый менеджер - Редактировать - /home/freeclou/app.optimyar.com/front-web/build/assets/fonts/course-level.tar
Назад
config/routes.json 0000644 00000002225 15107114263 0010226 0 ustar 00 { "routes": [ { "method": "GET", "path": "/course-levels", "handler": "course-level.find", "config": { "policies": [] } }, { "method": "GET", "path": "/course-levels/count", "handler": "course-level.count", "config": { "policies": [] } }, { "method": "GET", "path": "/course-levels/isCourseLevelLive/:id", "handler": "course-level.isCourseLevelLive", "config": { "policies": [] } }, { "method": "GET", "path": "/course-levels/:id", "handler": "course-level.findOne", "config": { "policies": [] } }, { "method": "POST", "path": "/course-levels", "handler": "course-level.create", "config": { "policies": [] } }, { "method": "PUT", "path": "/course-levels/:id", "handler": "course-level.update", "config": { "policies": [] } }, { "method": "DELETE", "path": "/course-levels/:id", "handler": "course-level.delete", "config": { "policies": [] } } ] } controllers/course-level.js 0000644 00000002071 15107114263 0012055 0 ustar 00 'use strict'; /** * Read the documentation (https://strapi.io/documentation/v3.x/concepts/controllers.html#core-controllers) * to customize this controller */ module.exports = { async find(ctx) { let entities; const {query} = ctx; const {user} = ctx.state; query["teacher_eq"] = user.id; if (query._q) { entities = await strapi.services["course-level"].search(query); } else { entities = await strapi.services["course-level"].find(query); } if (query.status_nin && query.status_nin.findIndex(s => s === "finish") > -1) { } else { } return ctx.send(entities); }, async isCourseLevelLive(ctx) { const {user} = ctx.state; const {id} = ctx.params; const response = { isAdobe: false, isLive: false, link: '', } const isBBBRun = await strapi.services.helpers.isBBBMeetingRunning(id); const isAdobeRun = await strapi.services.helpers.isAdobeRunning(id); response.isLive = isBBBRun || isAdobeRun; response.isAdobe = isAdobeRun; return ctx.send(response); } }; documentation/1.0.0/course-level.json 0000644 00000053124 15107114263 0013356 0 ustar 00 { "paths": { "/course-levels": { "get": { "deprecated": false, "description": "", "responses": { "200": { "description": "response", "content": { "application/json": { "schema": { "properties": { "foo": { "type": "string" } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "default": { "description": "unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } }, "summary": "", "tags": [ "Course-level" ], "parameters": [ { "name": "_limit", "in": "query", "required": false, "description": "Maximum number of results possible", "schema": { "type": "integer" }, "deprecated": false }, { "name": "_sort", "in": "query", "required": false, "description": "Sort according to a specific field.", "schema": { "type": "string" }, "deprecated": false }, { "name": "_start", "in": "query", "required": false, "description": "Skip a specific number of entries (especially useful for pagination)", "schema": { "type": "integer" }, "deprecated": false }, { "name": "=", "in": "query", "required": false, "description": "Get entries that matches exactly your input", "schema": { "type": "string" }, "deprecated": false }, { "name": "_ne", "in": "query", "required": false, "description": "Get records that are not equals to something", "schema": { "type": "string" }, "deprecated": false }, { "name": "_lt", "in": "query", "required": false, "description": "Get record that are lower than a value", "schema": { "type": "string" }, "deprecated": false }, { "name": "_lte", "in": "query", "required": false, "description": "Get records that are lower than or equal to a value", "schema": { "type": "string" }, "deprecated": false }, { "name": "_gt", "in": "query", "required": false, "description": "Get records that are greater than a value", "schema": { "type": "string" }, "deprecated": false }, { "name": "_gte", "in": "query", "required": false, "description": "Get records that are greater than or equal a value", "schema": { "type": "string" }, "deprecated": false }, { "name": "_contains", "in": "query", "required": false, "description": "Get records that contains a value", "schema": { "type": "string" }, "deprecated": false }, { "name": "_containss", "in": "query", "required": false, "description": "Get records that contains (case sensitive) a value", "schema": { "type": "string" }, "deprecated": false }, { "name": "_in", "in": "query", "required": false, "description": "Get records that matches any value in the array of values", "schema": { "type": "array", "items": { "type": "string" } }, "deprecated": false }, { "name": "_nin", "in": "query", "required": false, "description": "Get records that doesn't match any value in the array of values", "schema": { "type": "array", "items": { "type": "string" } }, "deprecated": false } ] }, "post": { "deprecated": false, "description": "Create a new record", "responses": { "200": { "description": "response", "content": { "application/json": { "schema": { "properties": { "foo": { "type": "string" } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "default": { "description": "unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } }, "summary": "", "tags": [ "Course-level" ], "requestBody": { "description": "", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NewCourse-level" } } } } } }, "/course-levels/count": { "get": { "deprecated": false, "description": "", "responses": { "200": { "description": "response", "content": { "application/json": { "schema": { "properties": { "foo": { "type": "string" } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "default": { "description": "unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } }, "summary": "", "tags": [ "Course-level" ], "parameters": [] } }, "/course-levels/isCourseLevelLive/{id}": { "get": { "deprecated": false, "description": "", "responses": { "200": { "description": "response", "content": { "application/json": { "schema": { "properties": { "foo": { "type": "string" } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "default": { "description": "unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } }, "summary": "", "tags": [ "Course-level" ], "parameters": [ { "name": "id", "in": "path", "description": "", "deprecated": false, "required": true, "schema": { "type": "string" } } ] } }, "/course-levels/{id}": { "get": { "deprecated": false, "description": "", "responses": { "200": { "description": "response", "content": { "application/json": { "schema": { "properties": { "foo": { "type": "string" } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "default": { "description": "unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } }, "summary": "", "tags": [ "Course-level" ], "parameters": [ { "name": "id", "in": "path", "description": "", "deprecated": false, "required": true, "schema": { "type": "string" } } ] }, "put": { "deprecated": false, "description": "Update a record", "responses": { "200": { "description": "response", "content": { "application/json": { "schema": { "properties": { "foo": { "type": "string" } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "default": { "description": "unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } }, "summary": "", "tags": [ "Course-level" ], "requestBody": { "description": "", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NewCourse-level" } } } }, "parameters": [ { "name": "id", "in": "path", "description": "", "deprecated": false, "required": true, "schema": { "type": "string" } } ] }, "delete": { "deprecated": false, "description": "Delete a record", "responses": { "200": { "description": "deletes a single record based on the ID supplied", "content": { "application/json": { "schema": { "type": "integer", "format": "int64" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "default": { "description": "unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } }, "summary": "", "tags": [ "Course-level" ], "parameters": [ { "name": "id", "in": "path", "description": "", "deprecated": false, "required": true, "schema": { "type": "string" } } ] } } }, "components": { "schemas": { "Course-level": { "required": [ "id", "title", "price", "fromDate", "toDate" ], "properties": { "id": { "type": "string" }, "title": { "type": "string", "minLength": 4 }, "coverImage": { "required": [ "id", "name", "hash", "mime", "size", "url", "provider" ], "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "alternativeText": { "type": "string" }, "caption": { "type": "string" }, "width": { "type": "integer" }, "height": { "type": "integer" }, "formats": { "type": "object" }, "hash": { "type": "string" }, "ext": { "type": "string" }, "mime": { "type": "string" }, "size": { "type": "number" }, "url": { "type": "string" }, "previewUrl": { "type": "string" }, "provider": { "type": "string" }, "provider_metadata": { "type": "object" }, "related": { "type": "string" }, "created_by": { "type": "string" }, "updated_by": { "type": "string" } } }, "price": { "type": "integer" }, "desc": { "type": "string" }, "enableDiscount": { "type": "boolean" }, "fromDate": { "type": "string", "format": "date-time" }, "toDate": { "type": "string", "format": "date-time" }, "status": { "type": "string", "enum": [ "register", "progress", "finish", "preRegister", "registerFinish" ] }, "location": { "type": "string" }, "infoLink": { "type": "string" }, "isLive": { "type": "boolean", "default": false }, "isGeneral": { "type": "boolean" }, "course": { "required": [ "id", "title" ], "properties": { "id": { "type": "string" }, "title": { "type": "string" }, "course_levels": { "type": "array", "items": { "type": "string" } }, "created_by": { "type": "string" }, "updated_by": { "type": "string" } } }, "teacher": { "required": [ "id", "username", "email", "name", "phoneNo" ], "properties": { "id": { "type": "string" }, "username": { "type": "string" }, "email": { "type": "string" }, "provider": { "type": "string" }, "password": { "type": "string" }, "resetPasswordToken": { "type": "string" }, "confirmed": { "type": "boolean" }, "blocked": { "type": "boolean" }, "role": { "type": "string" }, "name": { "type": "string" }, "family": { "type": "string" }, "phoneNo": { "type": "integer" }, "avatarImage": { "type": "string" }, "nationalCode": { "type": "string" }, "created_by": { "type": "string" }, "updated_by": { "type": "string" } } }, "desc2": { "type": "string" } } }, "NewCourse-level": { "required": [ "title", "price", "fromDate", "toDate" ], "properties": { "title": { "type": "string", "minLength": 4 }, "price": { "type": "integer" }, "desc": { "type": "string" }, "enableDiscount": { "type": "boolean" }, "sessions": { "type": "array", "items": { "type": "string" } }, "fromDate": { "type": "string", "format": "date-time" }, "toDate": { "type": "string", "format": "date-time" }, "status": { "type": "string", "enum": [ "register", "progress", "finish", "preRegister", "registerFinish" ] }, "location": { "type": "string" }, "infoLink": { "type": "string" }, "isLive": { "type": "boolean", "default": false }, "isGeneral": { "type": "boolean" }, "course": { "type": "string" }, "teacher": { "type": "string" }, "desc2": { "type": "string" }, "created_by": { "type": "string" }, "updated_by": { "type": "string" } } } } }, "tags": [] } models/course-level.js 0000644 00000000256 15107114263 0010775 0 ustar 00 'use strict'; /** * Read the documentation (https://strapi.io/documentation/v3.x/concepts/models.html#lifecycle-hooks) * to customize this model */ module.exports = {}; models/course-level.settings.json 0000644 00000003055 15107114263 0013171 0 ustar 00 { "kind": "collectionType", "collectionName": "course_levels", "info": { "name": "courseLevel", "description": "" }, "options": { "increments": true, "timestamps": true, "draftAndPublish": false }, "attributes": { "title": { "type": "string", "private": false, "required": true, "minLength": 4 }, "coverImage": { "model": "file", "via": "related", "allowedTypes": [ "images" ], "plugin": "upload", "required": false, "pluginOptions": {} }, "price": { "type": "integer", "required": true }, "desc": { "type": "text" }, "enableDiscount": { "type": "boolean" }, "sessions": { "private": true, "collection": "session" }, "fromDate": { "type": "datetime", "required": true }, "toDate": { "type": "datetime", "required": true }, "status": { "type": "enumeration", "enum": [ "register", "progress", "finish", "preRegister", "registerFinish" ], "required": false, "private": false }, "location": { "type": "string" }, "infoLink": { "type": "string" }, "isLive": { "type": "boolean", "default": false }, "isGeneral": { "type": "boolean" }, "course": { "model": "course" }, "teacher": { "plugin": "users-permissions", "model": "user" }, "desc2": { "type": "text" } } } services/course-level.js 0000644 00000001150 15107114263 0011327 0 ustar 00 'use strict'; /** * Read the documentation (https://strapi.io/documentation/v3.x/concepts/services.html#core-services) * to customize this service */ module.exports = { async getByIds(ids) {//ids must be array return await strapi.query("course-level").find({ id_in: ids }) }, async getTeacherLevels(teacherId) { try { const entities = await strapi.services["course-level"].find({teacher_eq: teacherId}); return { result: true, entity: entities }; } catch (ex) { return { result: false, entity: ex.message } } } };
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка