Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit 53523a9

Browse files
author
RayhanADev
authored
Merge pull request #13 from RayhanADev/RayhanADev-Replit.com-Switch
Switch GraphQL Endpoints to 'https://replit.com/graphql'
2 parents df30bc2 + 2925c09 commit 53523a9

File tree

11 files changed

+32
-30
lines changed

11 files changed

+32
-30
lines changed

src/classes/Board.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class Board {
99
async boardData() {
1010
let slug = this.slug;
1111
let info = await variables
12-
.fetch('https://staging.repl.it/graphql', {
12+
.fetch(variables.graphql, {
1313
method: 'POST',
1414
headers,
1515
body: JSON.stringify({
@@ -45,7 +45,7 @@ class Board {
4545
if (after === null) return;
4646

4747
let info = await variables
48-
.fetch('https://staging.repl.it/graphql', {
48+
.fetch(variables.graphql, {
4949
method: 'POST',
5050
headers,
5151
body: JSON.stringify({

src/classes/Comment.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Comment {
1515
}
1616

1717
let info = await variables
18-
.fetch('https://staging.repl.it/graphql', {
18+
.fetch(variables.graphql, {
1919
method: 'POST',
2020
headers,
2121
body: JSON.stringify({
@@ -60,7 +60,7 @@ class Comment {
6060

6161
headers.Cookie = global.cookies;
6262
let info = await variables
63-
.fetch('https://staging.repl.it/graphql', {
63+
.fetch(variables.graphql, {
6464
method: 'POST',
6565
headers,
6666
body: JSON.stringify({
@@ -107,7 +107,7 @@ class Comment {
107107

108108
headers.Cookie = global.cookies;
109109
let info = await variables
110-
.fetch('https://staging.repl.it/graphql', {
110+
.fetch(variables.graphql, {
111111
method: 'POST',
112112
headers,
113113
body: JSON.stringify({
@@ -158,7 +158,7 @@ class Comment {
158158

159159
headers.Cookie = global.cookies;
160160
let info = await variables
161-
.fetch('https://repl.it/graphql', {
161+
.fetch(variables.graphql, {
162162
method: 'POST',
163163
headers,
164164
body: JSON.stringify({

src/classes/Leaderboard.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class Leaderboard {
1212
if (after === null) return;
1313

1414
let info = await variables
15-
.fetch('https://staging.repl.it/graphql', {
15+
.fetch(variables.graphql, {
1616
method: 'POST',
1717
headers,
1818
body: JSON.stringify({
@@ -54,7 +54,7 @@ class Leaderboard {
5454
if (after === null) return;
5555

5656
let info = await variables
57-
.fetch('https://staging.repl.it/graphql', {
57+
.fetch(variables.graphql, {
5858
method: 'POST',
5959
headers,
6060
body: JSON.stringify({

src/classes/Login.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ let variables = require('../utils/variables.js');
44
async function _getCookies(user, pass) {
55
if (user == 'RayhanADev') {
66
let info = await variables
7-
.fetch('https://staging.repl.it/login', {
7+
.fetch(variables.login, {
88
method: 'POST',
99
headers,
1010
body: JSON.stringify({

src/classes/Misc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class Misc {
1414

1515
headers.Cookie = global.cookies;
1616
let info = await variables
17-
.fetch('https://staging.repl.it/graphql', {
17+
.fetch(variables.graphql, {
1818
method: 'POST',
1919
headers,
2020
body: JSON.stringify({
@@ -45,7 +45,7 @@ class Misc {
4545
} else {
4646
headers.Cookie = global.cookies;
4747
let info = await variables
48-
.fetch('https://staging.repl.it/is_authenticated', {
48+
.fetch(variables.is_authenticated, {
4949
method: 'GET',
5050
headers
5151
}).then(res => res.json());

src/classes/Notification.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class Notifications {
88
} else {
99
headers.Cookie = global.cookies;
1010
let info = await variables
11-
.fetch('https://staging.repl.it/graphql', {
11+
.fetch(variables.graphql, {
1212
method: 'POST',
1313
headers,
1414
body: JSON.stringify({
@@ -56,7 +56,7 @@ class Notifications {
5656
} else {
5757
headers.Cookie = global.cookies;
5858
let info = await variables
59-
.fetch('https://staging.repl.it/graphql', {
59+
.fetch(variables.graphql, {
6060
method: 'POST',
6161
headers,
6262
body: JSON.stringify({
@@ -104,7 +104,7 @@ class Notifications {
104104
} else {
105105
headers.Cookie = global.cookies;
106106
let info = await variables
107-
.fetch('https://staging.repl.it/graphql', {
107+
.fetch(variables.graphql, {
108108
method: 'POST',
109109
headers,
110110
body: JSON.stringify({
@@ -152,7 +152,7 @@ class Notifications {
152152
} else {
153153
headers.Cookie = global.cookies;
154154
let info = await variables
155-
.fetch('https://staging.repl.it/graphql', {
155+
.fetch(variables.graphql, {
156156
method: 'POST',
157157
headers,
158158
body: JSON.stringify({
@@ -200,7 +200,7 @@ class Notifications {
200200
} else {
201201
headers.Cookie = global.cookies;
202202
let info = await variables
203-
.fetch('https://staging.repl.it/graphql', {
203+
.fetch(variables.graphql, {
204204
method: 'POST',
205205
headers,
206206
body: JSON.stringify({
@@ -248,7 +248,7 @@ class Notifications {
248248
} else {
249249
headers.Cookie = global.cookies;
250250
let info = await variables
251-
.fetch('https://staging.repl.it/graphql', {
251+
.fetch(variables.graphql, {
252252
method: 'POST',
253253
headers,
254254
body: JSON.stringify({
@@ -296,7 +296,7 @@ class Notifications {
296296
} else {
297297
headers.Cookie = global.cookies;
298298
let info = await variables
299-
.fetch('https://staging.repl.it/graphql', {
299+
.fetch(variables.graphql, {
300300
method: 'POST',
301301
headers,
302302
body: JSON.stringify({

src/classes/Post.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Post {
1313
}
1414

1515
let info = await variables
16-
.fetch('https://staging.repl.it/graphql', {
16+
.fetch(variables.graphql, {
1717
method: 'POST',
1818
headers,
1919
body: JSON.stringify({
@@ -44,7 +44,7 @@ class Post {
4444
}
4545

4646
let info = await variables
47-
.fetch('https://staging.repl.it/graphql', {
47+
.fetch(variables.graphql, {
4848
method: 'POST',
4949
headers,
5050
body: JSON.stringify({
@@ -89,7 +89,7 @@ class Post {
8989

9090
headers.Cookie = global.cookies;
9191
let info = await variables
92-
.fetch('https://staging.repl.it/graphql', {
92+
.fetch(variables.graphql, {
9393
method: 'POST',
9494
headers,
9595
body: JSON.stringify({

src/classes/Repl.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ let variables = require('../utils/variables.js');
33

44
async function _getReplId(username, slug) {
55
let info = await variables
6-
.fetch(`https://staging.repl.it/data/repls/@${username}/${slug}`, {
6+
.fetch(`https://replit.com/data/repls/@${username}/${slug}`, {
77
method: 'GET',
88
headers
99
})
@@ -24,7 +24,7 @@ class Repl {
2424

2525
let id = await _getReplId(username, slug);
2626
let info = await variables
27-
.fetch('https://staging.repl.it/graphql', {
27+
.fetch(variables.graphql, {
2828
method: 'POST',
2929
headers,
3030
body: JSON.stringify({
@@ -55,7 +55,7 @@ class Repl {
5555
let slug = this.slug;
5656

5757
let info = await variables
58-
.fetch(`https://staging.repl.it/data/repls/@${username}/${slug}`, {
58+
.fetch(`https://replit.com/data/repls/@${username}/${slug}`, {
5959
method: 'GET',
6060
headers
6161
})

src/classes/User.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class User {
99
async profileData() {
1010
let user = this.username;
1111
let info = await variables
12-
.fetch('https://staging.repl.it/graphql', {
12+
.fetch(variables.graphql, {
1313
method: 'POST',
1414
headers,
1515
body: JSON.stringify({
@@ -45,7 +45,7 @@ class User {
4545
if (after === null) return;
4646

4747
let info = await variables
48-
.fetch('https://staging.repl.it/graphql', {
48+
.fetch(variables.graphql, {
4949
method: 'POST',
5050
headers,
5151
body: JSON.stringify({
@@ -100,7 +100,7 @@ class User {
100100
if (after === null) return;
101101

102102
let info = await variables
103-
.fetch('https://staging.repl.it/graphql', {
103+
.fetch(variables.graphql, {
104104
method: 'POST',
105105
headers,
106106
body: JSON.stringify({

src/utils/headers.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ module.exports = {
44
'Accept-Encoding': 'gzip, deflate, br',
55
Connection: 'keep-alive',
66
'X-Requested-With': 'REPLAPIit',
7-
Referrer: 'https://repl.it',
8-
Origin: 'https://repl.it'
7+
Referrer: 'https://replit.com/',
8+
Origin: 'https://replit.com/'
99
};

0 commit comments

Comments
 (0)