feat: expiry time
This commit is contained in:
@@ -23,10 +23,11 @@ async function getUrlApi(email: string) {
|
||||
await redis.set("inbound", JSON.stringify(inbound), "EX", 3600);
|
||||
const users: ClientSettings = JSON.parse(inbound.settings);
|
||||
const user = users.clients.find((user) => user.email === email);
|
||||
console.log(user);
|
||||
if (!user) {
|
||||
throw new Error("User not found");
|
||||
}
|
||||
return getValidUrl({ email, id: user.id });
|
||||
return { url: getValidUrl({ email, id: user.id }), expiryTime: user.expiryTime };
|
||||
}
|
||||
export async function getUrl(initData: string = "") {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user