diff --git a/discord_embed/api/post.mjs b/discord_embed/api/post.mjs index b85e745..dc0a18e 100644 --- a/discord_embed/api/post.mjs +++ b/discord_embed/api/post.mjs @@ -104,13 +104,16 @@ export default class IndexPost { if (!error) { try { - let params = [ - ctx.state.video, - ctx.state.image, - ctx.req.ip, - ] - let res = await ctx.db.safeCallProc('discord_embed.link_add', params) - let id = AlphabeticID.encode(res.first[0].id + 3843) + let id = 'health' + while (id === health) { + let params = [ + ctx.state.video, + ctx.state.image, + ctx.req.ip, + ] + let res = await ctx.db.safeCallProc('discord_embed.link_add', params) + id = AlphabeticID.encode(res.first[0].id + 3843) + } redirect = `${this.frontend}/${id}` } catch (err) {