Sindbad~EG File Manager
export const serializerMiddleware = (options, serializer) => (next, context) => async (args) => {
const endpoint = context.endpointV2?.url && options.urlParser
? async () => options.urlParser(context.endpointV2.url)
: options.endpoint;
if (!endpoint) {
throw new Error("No valid endpoint provider available.");
}
const request = await serializer(args.input, { ...options, endpoint });
return next({
...args,
request,
});
};
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists