Creating an http-endpoint

Hmmmm sorry, still no luck! :expressionless:
What do i missing?

I modified your code like:


import {response} from 'wix-http-functions';
import wixData from 'wix-data';

// You need to suppress authorization if your database has permissions
let full_suppress = {
 "suppressAuth": true,
 "suppressHooks": true
};

export function get_filter(request) {
 // First check if a query parameter is present in the request or not
     if(request.query) {
        return wixData.query("Team") //remember to put a return here
        .find(full_suppress) //suppress authorization checks
        .then( (res) => {
            // Now check the length of the items retrieved
            if(res.items.length > 0) {
                // Items found so return a 200 HTTP response
                let options = {
                    status: 200,
                    body: res.items
                };
                return response(options); // similar to ok()
            } else {
                 // No items found, return a 404 HTTP response
                let options = {
                     status: 404,
                     body: 'No items found'
                };
                return response(options); // similar to notFound()
            }
        })   
        .catch( (error) => {
         // This will catch any error with the wixdata query
             let options = {
                status: 500,
                body: error
             };
             return response(options); // similar to serverError()
        });
     } else {
      // Send a 400 response if no query params are found
         let options = {
            status: 400,
            body: 'No query parameters found'
         };
         return response(options); // similar to badRequest()
    }
}

Tried to get results with…
https://www.media-junkie.com/http-test/_functions/filter
…after publishing website.

Still the same ERROR…