Strapi Filter By Date Range
{{API_URL}}/doctors?filters[$or][0][createdAt][$gte]=2022-03-04&filters[$or][0][createdAt][$lte]=2022-03-09
{{API_URL}}/doctors?filters[$or][0][createdAt][$gte]=2022-03-04&filters[$or][0][createdAt][$lte]=2022-03-09
$(window).on(“navigate”, function (event, data) { var direction = data.state.direction; if (direction == ‘back’) { // do something } if (direction == ‘forward’) { // do something else }});
in .eslintrc replace the existing code with { “extends”: [“next/babel”]} Create file called .babelrc in your root directory and add this code{ “presets”: [“next/babel”], “plugins”: []}
go to the schema for the particular content type and add “options”: { “draftAndPublish”: false },
1. install pusher npm i pusher 2. inport pusher const Pusher = require(“pusher”); 3. Initialize The pusher app details let pusher = new Pusher({ appId: “1357043”, key: “718b7cb5ef13acf494ed”, secret: “b8db8f3102c255fd9136”, cluster: “ap2”, }); 4. Trigger the channel pusher.trigger(“my-channel”, “my-event”, { message: “Hello world from pusher” });
module.exports = { index: async ctx => { // Get posted params // const params = JSON.parse(ctx.request.body); //if post raw object using Postman const params = ctx.request.body; // The identifier is required. if (!params.identifier) { return ctx.badRequest( null, formatError({ id: ‘Auth.form.error.email.provide’, message: ‘Please provide your username or your e-mail.’, }) ); } // Other params …
{{API_LOCAL}}/patients?sort[0]=firstName:asc&sort[1]=updatedAt:desc
// ‘use strict’; /** * This is controller for `essential` */ module.exports = { async sendEmail(ctx) { try { let userResponse = await strapi.db.query(‘plugin::users-permissions.user’).findOne({ where: { email: ctx.request.body.email }, }); if (userResponse) { let resetToken = function (length) { var a = “abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890”.split(“”); var b = []; for (var i = 0; i < length; …
To change the the postgres user’s password follow this steps Login into the psql: $ sudo -u postgres psql Then in the psql console change the password and quit: postgres=# password postgresEnter new password: <new-password>postgres=# q
//get logged in member id let response= await strapi.db.query(‘api::doctor.doctor’).findOne({ where: { uid: ctx.state.user.id }, }); await strapi.plugins[“users-permissions”].services.user.sendConfirmationEmail(user);