Uncategorized

user.js

 ‘use strict’; /** * Auth.js controller * * @description: A set of functions called “actions” for managing `Auth`. */ /* eslint-disable no-useless-escape */ const crypto = require(‘crypto’); const _ = require(‘lodash’); const utils = require(‘@strapi/utils’); const { getService } = require(‘../utils’); const { validateCallbackBody, validateRegisterBody, validateSendEmailConfirmationBody, } = require(‘./validation/auth’); const { sanitize } = utils; …

user.js Read More »

js fetch

 let headersList = {  “Accept”: “*/*”,  “User-Agent”: “Thunder Client (https://www.thunderclient.com)” } fetch(“https://newsapi.org/v2/everything?q=ipl&from=2022-01-07&sortBy=publishedAt&apiKey=739ea6a82b1f4818a21c8aa2441545c0”, {    method: “GET”,   headers: headersList }).then(function(response) {   return response.text(); }).then(function(data) {   console.log(data); })

ALL HTTP Status Code

100 Continue101 Switching Protocols103 Early Hints200 OK201 Created202 Accepted203 Non-Authoritative Information204 No Content205 Reset Content206 Partial Content300 Multiple Choices301 Moved Permanently302 Found303 See Other304 Not Modified307 Temporary Redirect308 Permanent Redirect400 Bad Request401 Unauthorized402 Payment Required403 Forbidden404 Not Found405 Method Not Allowed406 Not Acceptable407 Proxy Authentication Required408 Request Timeout409 Conflict410 Gone411 Length Required412 Precondition Failed413 Payload …

ALL HTTP Status Code Read More »

EDD Licence expired

  //licence is expired start here if ($response_body[‘license’] == ‘invalid’){ if(isset($response_body[‘error’])){ if($response_body[‘error’] == ‘expired’){ update_option( ‘WCGAAW_LICENSE_STATUS’,‘expired’); return true; } if($response_body[‘error’] == ‘no_activations_left’){ $expiredDate = strtotime(date(‘d-m-Y’, strtotime($response_body[‘expires’]))); $todayDate = strtotime(date(‘d-m-Y’)); if($expiredDate < $todayDate){ update_option( ‘WCGAAW_LICENSE_STATUS’,‘expired’); return true; } } } }