basalt / drives/src / driveRoutes
Function: driveRoutes()
> driveRoutes(options): BasaltRoute[]
Defined in: drives/src/routes.ts:196
The connect flow and (optionally) the notification endpoint, as neutral routes.
ts
fastifyPlugin({ routes: driveRoutes({
redirectUri: (provider) => `https://app.example.com/drives/${provider}/callback`,
successRedirect: '/settings/drives',
notifications: {
connections: ({ accountIds }) => db.driveConnections.byAccount('dropbox', accountIds),
onChange: (connections) => Promise.all(connections.map((c) => SyncDrive.dispatch(c))),
},
}) })