mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2026-04-28 03:07:38 +02:00
p2p instant question sending fixes
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { PeerInfo } from '../types/basicTypes'
|
||||
import { paths } from './files'
|
||||
import { parseCookies, post } from './networkUtils'
|
||||
import { parseCookie, post } from './networkUtils'
|
||||
import utils from './utils'
|
||||
|
||||
export function peerToString(peer: {
|
||||
@@ -33,7 +33,7 @@ export function updatePeersFile(
|
||||
}
|
||||
|
||||
export async function loginToPeer(peer: PeerInfo): Promise<string | Error> {
|
||||
const { data, error, cookies } = await post<{
|
||||
const { data, error, cookie } = await post<{
|
||||
result: string
|
||||
msg: string
|
||||
}>({
|
||||
@@ -48,6 +48,6 @@ export async function loginToPeer(peer: PeerInfo): Promise<string | Error> {
|
||||
return data ? new Error(data.msg) : error
|
||||
}
|
||||
|
||||
const parsedCookies = parseCookies(cookies)
|
||||
const parsedCookies = parseCookie(cookie)
|
||||
return parsedCookies.sessionID
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user