This is only verified to work as far back as U15, I have not tried to test any builds older than that yet until they are added to the support list. Reviewed-on: #2978 Reviewed-by: Sainan <63328889+sainan@users.noreply.github.com> Co-authored-by: VoltPrime <subsonicjackal@gmail.com> Co-committed-by: VoltPrime <subsonicjackal@gmail.com>
		
			
				
	
	
		
			18 lines
		
	
	
		
			759 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			759 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
import type { RequestHandler } from "express";
 | 
						|
import { deleteSession } from "../../managers/sessionManager.ts";
 | 
						|
import { getAccountForRequest } from "../../services/loginService.ts";
 | 
						|
import { version_compare } from "../../helpers/inventoryHelpers.ts";
 | 
						|
 | 
						|
const deleteSessionController: RequestHandler = async (_req, res) => {
 | 
						|
    const account = await getAccountForRequest(_req);
 | 
						|
    deleteSession(_req.query.sessionId as string);
 | 
						|
    if (account.BuildLabel && version_compare(account.BuildLabel, "2016.07.08.16.56") < 0) {
 | 
						|
        // Pre-Specters of the Rail
 | 
						|
        res.send(_req.query.sessionId as string); // Unsure if this is correct, but the client is chill with it
 | 
						|
    } else {
 | 
						|
        res.sendStatus(200);
 | 
						|
    }
 | 
						|
};
 | 
						|
 | 
						|
export { deleteSessionController };
 |