Add partner SMS gateway via Gama SendQuick and document it.
Expose POST /public/sms/send with API key + domain allowlist for external backends like Balout, wire Meshkee OTP/message sends to Gama, and publish Partner SMS docs on /docs/website. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
267a218c26
commit
f4295e780c
@@ -21,4 +21,20 @@ export class RedisService {
|
||||
async deleteOtp(cellNumber: string): Promise<void> {
|
||||
await this.redis.del(`otp:${cellNumber}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sliding fixed-window counter. Returns true if the call is within `limit`
|
||||
* for the given key over `windowSeconds`.
|
||||
*/
|
||||
async incrementWithLimit(
|
||||
key: string,
|
||||
limit: number,
|
||||
windowSeconds: number,
|
||||
): Promise<boolean> {
|
||||
const count = await this.redis.incr(key);
|
||||
if (count === 1) {
|
||||
await this.redis.expire(key, windowSeconds);
|
||||
}
|
||||
return count <= limit;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user