45f0f7eefe
* Direct port of embeds to new arch (cherry picked from commit cc3fa1f6cea396dd9222486c633a508bfee1ecd6) * Re-org * Split out ListEmbed and FeedEmbed * Split out ImageEmbed * DRY up a bit * Port over ExternalLinkEmbed * Port over Player and Gif embeds * Migrate ComposerReplyTo * Replace other usages of old post-embeds * Migrate view contexts * Copy pasta VideoEmbed * Copy pasta GifEmbed * Swap in new file location * Clean up * Fix up native * Add back in correct moderation on List and Feed embeds * Format * Prettier * delete old video utils * move bandwidth-estimate.ts * Remove log * Add LazyQuoteEmbed for composer use * Clean up unused things * Remove remaining items * Prettier * Fix imports * Handle nested quotes same as prod * Add back silenced error handling * Fix lint --------- Co-authored-by: Samuel Newman <mozzius@protonmail.com>
22 lines
868 B
TypeScript
22 lines
868 B
TypeScript
import {type Express} from 'express'
|
|
|
|
import {type AppContext} from '../context.js'
|
|
import {default as createShortLink} from './createShortLink.js'
|
|
import {default as health} from './health.js'
|
|
import {default as redirect} from './redirect.js'
|
|
import {default as root} from './root.js'
|
|
import {default as shortLink} from './shortLink.js'
|
|
import {default as siteAssociation} from './siteAssociation.js'
|
|
|
|
export * from './util.js'
|
|
|
|
export default function (ctx: AppContext, app: Express) {
|
|
app = health(ctx, app) // GET /_health
|
|
app = siteAssociation(ctx, app) // GET /.well-known/apple-app-site-association
|
|
app = redirect(ctx, app) // GET /redirect
|
|
app = createShortLink(ctx, app) // POST /link
|
|
app = root(ctx, app) // GET / (redirect to bsky.app on root)
|
|
app = shortLink(ctx, app) // GET /:linkId (should go last due to permissive matching)
|
|
return app
|
|
}
|