fix b2 url format saved in database
i omitted the / between bucket name and key
Before => ${url.href}${this.bucket}${key}
Now => ${url.href}${this.bucket}/${key}
Before => ${url.href}${this.bucket}${key}
Now => ${url.href}${this.bucket}/${key}
fix key saved in File table in db
it seems instead of using the key i used the extension to save inside the key field
finally got storage system working
Tested by creating a bot /getpic command that :
1. gets the user's telegram profile pic url,
2. get the raw file using axios,
3. convert to buffer,
4. save to backblaze
3. save metadata(mimetype, key, storage url and imagekit url) to db
6. return imagekit link
1. gets the user's telegram profile pic url,
2. get the raw file using axios,
3. convert to buffer,
4. save to backblaze
3. save metadata(mimetype, key, storage url and imagekit url) to db
6. return imagekit link
refactored Storage system to fix some bugs
installed @types/minio and removed some line of codes that was causing issues
new helper downloadPhoto() to download any image other than profile picture from telegram
new helper downloadProfilePhoto to download user profile picture from telegram
finished watching Tensei shitara Slime Datta Ken 2nd Season Episode 11
add helper to generate random username using human-readable-ids
Here's how i did it:
ts
import { hri } from "human-readable-ids"
export function genereateUsername() {
return hri.random()
}
ts
import { hri } from "human-readable-ids"
export function genereateUsername() {
return hri.random()
}
introduce a custom payment system module
move typescript types into their own files
wrapped logger.info into a helper function
installed sharp
moved telegram helpers to telegram root directory
move bot initialization to another file
install human-readable-ids
properly resize buttons in 2nd menu for account creation.
The first image, i put all options in a single which didn't give me what i wanted. The second image, for each two button in row, i put them in a single array, while the last button is in its own array.
account creation: delete previous message in step1
finally got account creation wizard working
Currently, the wizard uses session to save input in each step then i log to console to see final result.
I did it this way because i was testing it telegraf's wizard scenes.
Next up, is to save this data in the database.
I did it this way because i was testing it telegraf's wizard scenes.
Next up, is to save this data in the database.
got winston working
yarn add libphonenumber-js title
these two packages will be extensively for the bot and webapp.
1. libphonenumber-js ==> will be used to validate phone numbers input from the user. Because i'm not familiar with regex, it's the best alternative for.
2. title ==> will be used to titleize names for users, products, stores etc.
1. libphonenumber-js ==> will be used to validate phone numbers input from the user. Because i'm not familiar with regex, it's the best alternative for.
2. title ==> will be used to titleize names for users, products, stores etc.
removed old paystack webhook
add winston logger
upgrade to blitz@0.33.0, @prisma/client@2.19.0, prisma@2.19.0
Implemented new Storage system
it's a 100% port of https://twitter.com/jeserodz/status/1371920489132781568. Direct link at https://github.com/jeserodz/nestjs-land/blob/main/libs/storage/src/storage.service.ts
New methods were added to in accordance to my needs, eg: replaced typeorm with prisma
New methods were added to in accordance to my needs, eg: replaced typeorm with prisma
Stephane Mensah
Author
Oh I forgot to mention that i replaced(totally removed it from my project) aws-sdk in favor of min.io
Added a new File model to save uploaded files metadata
I came up with this idea after seeing [this tweet](https://twitter.com/flybayer/status/1371865319271239680)