Remove source from rate limit message
This commit is contained in:
parent
072bf2c775
commit
f00c6f2f4d
4 changed files with 8 additions and 8 deletions
|
@ -69,7 +69,7 @@ export async function POST({ locals, request }) {
|
|||
|
||||
if (!success) {
|
||||
const timeRemaining = Math.floor((reset - Date.now()) / 1000);
|
||||
const message = `Võta veits rahulikumalt. API Proovi ${timeRemaining}s pärast uuesti.`;
|
||||
const message = `Võta veits rahulikumalt. Proovi ${timeRemaining}s pärast uuesti.`;
|
||||
|
||||
return json({ error: message }, { status: 429 });
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ export const load: PageServerLoad = async (event) => {
|
|||
|
||||
if (!seshSuccess) {
|
||||
const timeRemaining = Math.floor((seshReset - Date.now()) / 1000);
|
||||
const message = `Sesh Proovi ${timeRemaining}s pärast uuesti.`;
|
||||
const message = `Proovi ${timeRemaining}s pärast uuesti.`;
|
||||
|
||||
return {
|
||||
stage: stage,
|
||||
|
@ -62,7 +62,7 @@ export const load: PageServerLoad = async (event) => {
|
|||
|
||||
if (!ipSuccess) {
|
||||
const timeRemaining = Math.floor((ipReset - Date.now()) / 1000);
|
||||
const message = `IP Proovi ${timeRemaining}s pärast uuesti.`;
|
||||
const message = `Proovi ${timeRemaining}s pärast uuesti.`;
|
||||
|
||||
return {
|
||||
stage: stage,
|
||||
|
|
|
@ -61,7 +61,7 @@ export const actions: Actions = {
|
|||
|
||||
if (!seshSuccess) {
|
||||
const timeRemaining = Math.floor((seshReset - Date.now()) / 1000);
|
||||
const message = `Võta veits rahulikumalt. Sesh Proovi ${timeRemaining}s pärast uuesti.`;
|
||||
const message = `Võta veits rahulikumalt. Proovi ${timeRemaining}s pärast uuesti.`;
|
||||
|
||||
if (form.errors.answer) {
|
||||
form.errors.answer.push(message);
|
||||
|
@ -75,7 +75,7 @@ export const actions: Actions = {
|
|||
|
||||
if (!ipSuccess) {
|
||||
const timeRemaining = Math.floor((ipReset - Date.now()) / 1000);
|
||||
const message = `Võta veits rahulikumalt. IP Proovi ${timeRemaining}s pärast uuesti.`;
|
||||
const message = `Võta veits rahulikumalt. Proovi ${timeRemaining}s pärast uuesti.`;
|
||||
|
||||
if (form.errors.answer) {
|
||||
form.errors.answer.push(message);
|
||||
|
@ -177,7 +177,7 @@ export const actions: Actions = {
|
|||
|
||||
if (!seshSuccess) {
|
||||
const timeRemaining = Math.floor((seshReset - Date.now()) / 1000);
|
||||
const message = `Võta veits rahulikumalt. Sesh Proovi ${timeRemaining}s pärast uuesti.`;
|
||||
const message = `Võta veits rahulikumalt. Proovi ${timeRemaining}s pärast uuesti.`;
|
||||
|
||||
if (form.errors.question) {
|
||||
form.errors.question.push(message);
|
||||
|
@ -191,7 +191,7 @@ export const actions: Actions = {
|
|||
|
||||
if (!ipSuccess) {
|
||||
const timeRemaining = Math.floor((ipReset - Date.now()) / 1000);
|
||||
const message = `Võta veits rahulikumalt. IP Proovi ${timeRemaining}s pärast uuesti.`;
|
||||
const message = `Võta veits rahulikumalt. Proovi ${timeRemaining}s pärast uuesti.`;
|
||||
|
||||
if (form.errors.question) {
|
||||
form.errors.question.push(message);
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
>Sul on alles {data.user.balance > 0 ? data.user.balance : data.poolSize > 0 ? 0 : 1} küsimust.</Card.Description
|
||||
>
|
||||
</Card.Header>
|
||||
{#if data.user.balance === 0 && (!data.question || data.poolSize > 0)}
|
||||
{#if data.user.balance === 0 && (data.question || data.poolSize > 0)}
|
||||
<Card.Content>
|
||||
<p class="text-sm leading-6">Enne küsimist pead kõigepealt vastama teistele!</p>
|
||||
</Card.Content>
|
||||
|
|
Loading…
Add table
Reference in a new issue