Welcome Guest, Not a member yet? Register   Sign In
Double Insert Data in Filter Before CI4
#3

(This post was last modified: 05-29-2022, 07:42 PM by flux1on.)

(05-29-2022, 06:47 PM)iRedds Wrote: You are calling the function twice.
PHP Code:
    if (Services::validationApiKey($tokenApi)) {  // <-- here
        return [
            'success' => Services::validationApiKey($tokenApi), // <-- and here
            'data'    => $tokenApi,
        ];
    

You need to review all code.

Okay thankyou @iRedds, now no double data again in database with

PHP Code:
    // JWT is sent from client in the format Bearer XXXXXXXXX
    $tokenApi explode(' '$authenticationHeader)[1];

    if (Services::validationApiKey($tokenApi)) {
        return true;
    }

    throw new Exception('API Key tidak terdapat di database'); 
Reply


Messages In This Thread
RE: Double Insert Data in Filter Before CI4 - by flux1on - 05-29-2022, 07:38 PM



Theme © iAndrew 2016 - Forum software by © MyBB