mirror of
				https://github.com/D4M13N-D3V/neroshitron.git
				synced 2025-11-04 03:25:35 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			17 lines
		
	
	
		
			518 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			518 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
import { NextApiRequest, NextApiResponse } from 'next';
 | 
						|
import { createClient } from "@/utils/supabase/server";
 | 
						|
import { NextResponse } from "next/server";
 | 
						|
 | 
						|
export async function GET(request: Request) {
 | 
						|
    try {
 | 
						|
        const supabase = createClient();        
 | 
						|
        const { data, error } = await supabase.auth.admin.listUsers();
 | 
						|
        console.log(error)
 | 
						|
        if (error) {
 | 
						|
            throw error;
 | 
						|
        }
 | 
						|
    return NextResponse.json(data);
 | 
						|
    } catch (error) {
 | 
						|
        return NextResponse.error();
 | 
						|
    }
 | 
						|
} |