Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Administrator
/
chatgpt.ai-pro.org
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
3
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
23379886
authored
2024-05-10 15:01:36 +0800
by
Leff Tubat
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Removed console
1 parent
b674f2da
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
index.js
index.js
View file @
2337988
...
...
@@ -346,7 +346,7 @@ async function runOpensource(req, res) {
}
async
function
authenticate
(
params
)
{
console
.
log
(
"349"
,
params
)
let
data
=
await
fetch
(
`
${
hostapi
}
/e/authenticate/v2`
,
{
method
:
"POST"
,
headers
:
{
...
...
@@ -355,12 +355,12 @@ async function authenticate(params) {
body
:
JSON
.
stringify
(
params
),
referrer
:
"https://chatgpt.ai-pro.org"
});
console
.
log
(
"358"
,
data
);
return
await
data
.
json
();
}
async
function
getLimitedUsage
(
params
)
{
console
.
log
(
"363"
,
params
)
let
data
=
await
fetch
(
`
${
hostapi
}
/e/get-usage`
,
{
method
:
"POST"
,
headers
:
{
...
...
@@ -369,11 +369,11 @@ async function getLimitedUsage(params) {
body
:
JSON
.
stringify
(
params
),
referrer
:
"https://chatgpt.ai-pro.org"
});
console
.
log
(
"372"
,
data
);
return
await
data
.
json
();
}
async
function
getUsage
(
params
)
{
console
.
log
(
"376"
,
params
)
let
data
=
await
fetch
(
`
${
hostapi
}
/e/get-chat-usage`
,
{
method
:
"POST"
,
headers
:
{
...
...
@@ -382,11 +382,11 @@ async function getUsage(params) {
body
:
JSON
.
stringify
(
params
),
referrer
:
"https://chatgpt.ai-pro.org"
});
console
.
log
(
"373"
,
data
);
return
await
data
.
json
();
}
async
function
setUsage
(
params
)
{
console
.
log
(
"389"
,
params
)
fetch
(
`
${
hostapi
}
/e/set-usage`
,
{
method
:
"POST"
,
headers
:
{
...
...
@@ -397,7 +397,7 @@ async function setUsage(params) {
});
}
async
function
setChatUsage
(
params
)
{
console
.
log
(
"400"
,
params
)
fetch
(
`
${
hostapi
}
/e/set-chat-usage`
,
{
method
:
"POST"
,
headers
:
{
...
...
@@ -416,7 +416,7 @@ async function validation (aiwp_app_id, req, res) {
if
(
aiwp_logged_in
)
{
let
auth
=
await
authenticate
({
"aiwp_logged_in"
:
aiwp_logged_in
,
"user_event_data"
:
{},
"user_event"
:
"endpoint"
});
console
.
log
(
auth
)
if
(
!
auth
.
success
)
{
IS_FREE_USER
=
true
;
if
(
auth
.
is_restrict
)
{
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment