Skip to content

Commit

Permalink
update sig & restruct
Browse files Browse the repository at this point in the history
  • Loading branch information
s-alad committed Mar 29, 2024
1 parent fce510a commit d331c1d
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 6 deletions.
5 changes: 3 additions & 2 deletions client/pages/api/add/post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import sharp from 'sharp';
import moment from 'moment';
// @ts-ignore
import * as convert from 'heic-convert';
import { BEREAL_SIGNATURE } from '@/utils/constants';

export const config = {
api: {
Expand Down Expand Up @@ -136,7 +137,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
let upload_headers = {
"authorization": "Bearer " + authorization_token,
'bereal-app-version-code': '14549',
'bereal-signature': 'MToxNzEwOTU0MTc2OmPlM3WPWqPWRq7EseRiT98fErcmwWg1yUatGmYZnzaH',
'bereal-signature': BEREAL_SIGNATURE,
'bereal-timezone': 'Europe/Paris',
'bereal-device-id': '937v3jb942b0h6u9'
}
Expand Down Expand Up @@ -226,7 +227,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
"content-type": "application/json",
"Authorization": "Bearer " + authorization_token,
'bereal-app-version-code': '14549',
'bereal-signature': 'MToxNzEwOTU0MTc2OmPlM3WPWqPWRq7EseRiT98fErcmwWg1yUatGmYZnzaH',
'bereal-signature': BEREAL_SIGNATURE,
'bereal-timezone': 'Europe/Paris',
'bereal-device-id': '937v3jb942b0h6u9',
"bereal-os-version": "14.7.1",
Expand Down
3 changes: 2 additions & 1 deletion client/pages/api/all.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { NextApiRequest, NextApiResponse } from 'next'
import axios from 'axios';
import { BEREAL_SIGNATURE } from '@/utils/constants';

export const config = {
api: {
Expand All @@ -16,7 +17,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
let headers = {
"authorization": "Bearer " + authorization_token,
'bereal-app-version-code': '14549',
'bereal-signature': 'MToxNzEwOTU0MTc2OmPlM3WPWqPWRq7EseRiT98fErcmwWg1yUatGmYZnzaH',
'bereal-signature': BEREAL_SIGNATURE,
'bereal-timezone': 'Europe/Paris',
'bereal-device-id': '937v3jb942b0h6u9'
}
Expand Down
3 changes: 2 additions & 1 deletion client/pages/api/comment.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { NextApiRequest, NextApiResponse } from 'next'
import axios from 'axios';
import { BEREAL_SIGNATURE } from '@/utils/constants';

export default async function handler(req: NextApiRequest, res: NextApiResponse) {

Expand All @@ -13,7 +14,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
let headers = {
"authorization": "Bearer " + authorization_token,
'bereal-app-version-code': '14549',
'bereal-signature': 'MToxNzEwOTU0MTc2OmPlM3WPWqPWRq7EseRiT98fErcmwWg1yUatGmYZnzaH',
'bereal-signature': BEREAL_SIGNATURE,
'bereal-timezone': 'Europe/Paris',
'bereal-device-id': '937v3jb942b0h6u9',
}
Expand Down
3 changes: 2 additions & 1 deletion client/pages/api/feed.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { NextApiRequest, NextApiResponse } from 'next'
import axios from 'axios';
import { BEREAL_SIGNATURE } from '@/utils/constants';

export const config = {
api: {
Expand All @@ -16,7 +17,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
let headers = {
"authorization": "Bearer " + authorization_token,
"bereal-app-version-code": "14549",
"bereal-signature": "MToxNzEwOTU0MTc2OmPlM3WPWqPWRq7EseRiT98fErcmwWg1yUatGmYZnzaH",
"bereal-signature": BEREAL_SIGNATURE,
'bereal-device-id': '937v3jb942b0h6u9',
'bereal-timezone': 'Europe/Paris',
}
Expand Down
3 changes: 2 additions & 1 deletion client/pages/api/friends.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { NextApiRequest, NextApiResponse } from 'next'
import axios from 'axios';
import { BEREAL_SIGNATURE } from '@/utils/constants';

export default async function handler(req: NextApiRequest, res: NextApiResponse) {
let authorization_token = req.body.token;
Expand All @@ -8,7 +9,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
let headers = {
"authorization": "Bearer " + authorization_token,
"bereal-app-version-code": "14549",
"bereal-signature": "MToxNzEwOTU0MTc2OmPlM3WPWqPWRq7EseRiT98fErcmwWg1yUatGmYZnzaH",
"bereal-signature": BEREAL_SIGNATURE,
'bereal-device-id': '937v3jb942b0h6u9',
'bereal-timezone': 'Europe/Paris',
}
Expand Down
11 changes: 11 additions & 0 deletions client/utils/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
let BEREAL_SIGNATURE = "MToxNzExNTc0ODYyOoqIZ5a9FAreOBIuDRzjdonbo6QGGOQDNCQzQ5vC1UI4";


let HEADERS = {
"bereal-app-version-code": "14549",
"bereal-timezone": "Europe/Paris",
"bereal-device-id": "937v3jb942b0h6u9",
"bereal-signature": BEREAL_SIGNATURE,
}

export { BEREAL_SIGNATURE, HEADERS };

0 comments on commit d331c1d

Please sign in to comment.