mirror of
https://github.com/GithubOrgProjectPiza/server.git
synced 2026-09-04 16:46:07 +02:00
Remove testroutes; Update register endpoint; Add Redis lib
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import redis, { createClient } from "redis";
|
||||
import { promisify } from "util";
|
||||
|
||||
function createAsyncClient(client: redis.RedisClientType) {
|
||||
return {
|
||||
get: promisify(client.get).bind(client),
|
||||
set: promisify(client.set).bind(client),
|
||||
};
|
||||
}
|
||||
|
||||
/*----E-mail verify----*/
|
||||
|
||||
const email: redis.RedisClientType = createClient({
|
||||
url: "redis://localhost:6379",
|
||||
});
|
||||
|
||||
export const emailClient = createAsyncClient(email);
|
||||
Reference in New Issue
Block a user