Compare commits
No commits in common. "bfb53d5c64eb21eb32943ab168137f9cec1ee493" and "5a5e034ba882131786d4a9488f4da3ff5a624541" have entirely different histories.
bfb53d5c64
...
5a5e034ba8
6 changed files with 9 additions and 9 deletions
|
@ -10,7 +10,7 @@ import {
|
|||
SlashCommandStringOption,
|
||||
} from "npm:discord.js@14.14.1";
|
||||
import { channel, log_from, SimpleResult, split_promise } from "./utils.ts";
|
||||
const log = log_from(import.meta.url);
|
||||
const log = (...args: unknown[]) => log_from(import.meta.url, ...args);
|
||||
|
||||
/**
|
||||
* Wraps a discord bot and implements required actions.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { z } from "https://deno.land/x/zod@v3.22.4/mod.ts";
|
||||
import { log_from } from "./utils.ts";
|
||||
const log = log_from(import.meta.url);
|
||||
const log = (...args: unknown[]) => log_from(import.meta.url, ...args);
|
||||
|
||||
/**
|
||||
* Wraps the CRI API.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { ClientOptions, SMTPClient } from "https://deno.land/x/denomailer@1.6.0/mod.ts";
|
||||
import { log_from } from "./utils.ts";
|
||||
const log = log_from(import.meta.url);
|
||||
const log = (...args: unknown[]) => log_from(import.meta.url, ...args);
|
||||
|
||||
export type EmailerConfig = {
|
||||
hostname: string;
|
||||
|
@ -46,7 +46,7 @@ export class Emailer {
|
|||
}
|
||||
}
|
||||
|
||||
const CONFIRMATION_EMAIL_SUBJECT = "[epiTLS] Confirmation d'association à un compte discord.";
|
||||
const CONFIRMATION_EMAIL_SUBJECT = "Confirmation d'association à un compte discord";
|
||||
function confirmation_email_body(discord_username: string, link: string) {
|
||||
return `<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
@ -65,7 +65,7 @@ Si vous n'êtes pas à l'origine de cette demande, veuillez ignorer ce message.
|
|||
|
||||
---
|
||||
Je suis un robot et cette action à été effectuée automatiquement.
|
||||
Vous pouvez contacter le développeur de ce service à l'email matthieu at imagevo dot fr.
|
||||
Vous pouvez contacter le développeur de se service à l'email matthieu at imagevo dot fr.
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -7,7 +7,7 @@ import { EpitlsBot } from "./bot.ts";
|
|||
import { CriApi } from "./cri.ts";
|
||||
import { Emailer } from "./email.ts";
|
||||
import { WebVerifier } from "./verifier.ts";
|
||||
const log = log_from(import.meta.url);
|
||||
const log = (...args: unknown[]) => log_from(import.meta.url, ...args);
|
||||
|
||||
async function main() {
|
||||
const conf = await read_conf(root_path() + "/conf.json");
|
||||
|
|
|
@ -51,10 +51,10 @@ export type Resolver<T> = (item: T) => void;
|
|||
/**
|
||||
* Logging function factory.
|
||||
*/
|
||||
export function log_from(url: string) {
|
||||
export function log_from(url: string, ...args: unknown[]) {
|
||||
const date = new Date().toLocaleString("fr-FR");
|
||||
const file = path.basename(new URL(url).pathname);
|
||||
return (...args: unknown[]) => console.log(`[${date}][epitls][${file}]`, ...args);
|
||||
console.log(`[${date}][epitls][${file}]`, ...args);
|
||||
}
|
||||
|
||||
export type Conf = Awaited<ReturnType<typeof read_conf>>;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { v1 as uuid } from "https://deno.land/std@0.213.0/uuid/mod.ts";
|
||||
import { channel, log_from, Resolver, SimpleResult, split_promise, wait } from "./utils.ts";
|
||||
const log = log_from(import.meta.url);
|
||||
const log = (...args: unknown[]) => log_from(import.meta.url, ...args);
|
||||
|
||||
export type WebVerifierConf = {
|
||||
port: number;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue