discord_embed: Post now auto-skips /health xD
All checks were successful
continuous-integration/appveyor/branch AppVeyor build succeeded
All checks were successful
continuous-integration/appveyor/branch AppVeyor build succeeded
This commit is contained in:
parent
a13ac57bc8
commit
b8ed6a1c99
1 changed files with 10 additions and 7 deletions
|
@ -104,13 +104,16 @@ export default class IndexPost {
|
||||||
|
|
||||||
if (!error) {
|
if (!error) {
|
||||||
try {
|
try {
|
||||||
|
let id = 'health'
|
||||||
|
while (id === health) {
|
||||||
let params = [
|
let params = [
|
||||||
ctx.state.video,
|
ctx.state.video,
|
||||||
ctx.state.image,
|
ctx.state.image,
|
||||||
ctx.req.ip,
|
ctx.req.ip,
|
||||||
]
|
]
|
||||||
let res = await ctx.db.safeCallProc('discord_embed.link_add', params)
|
let res = await ctx.db.safeCallProc('discord_embed.link_add', params)
|
||||||
let id = AlphabeticID.encode(res.first[0].id + 3843)
|
id = AlphabeticID.encode(res.first[0].id + 3843)
|
||||||
|
}
|
||||||
redirect = `${this.frontend}/${id}`
|
redirect = `${this.frontend}/${id}`
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
|
|
Loading…
Reference in a new issue