@uppy/companion
Version:
OAuth helper and remote fetcher for Uppy's (https://uppy.io) extensible file upload widget with support for drag&drop, resumable uploads, previews, restrictions, file processing/encoding, remote providers like Dropbox and Google Drive, S3 and more :dog:
18 lines (17 loc) • 463 B
JavaScript
import { respondWithError } from '../provider/error.js';
export default async function search({ query, companion }, res, next) {
const { providerUserSession } = companion;
try {
const data = await companion.provider.search({
companion,
providerUserSession,
query,
});
res.json(data);
}
catch (err) {
if (respondWithError(err, res))
return;
next(err);
}
}