- What is the relation between
credit_transations
andpayouts
? I saw1:1
on the diagram. If this is correct, can we combine the tables into one? telegram_chats
telegram_chat_id
- we have bothid
andtelegram_chat_id
fields. Can we renametelegram_chat_id
field totelegram_id
ortelegram_message_id
? Or renametelegram_chats
table tochats
ortelegram_messages
.- Do we need
text
field to store text? - Do we need soft delete on this table?
telegram_users
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useNavigate } from '@remix-run/react' | |
import type { ShouldRevalidateFunction } from '@remix-run/react' | |
import type { ActionFunctionArgs, LoaderFunctionArgs } from '@remix-run/node' | |
import { Banner, BlockStack, Button, Card, Icon, Modal, Page, Text } from '@shopify/polaris' | |
import { CheckIcon } from '@shopify/polaris-icons' | |
import { authenticate } from '../shopify.server' | |
import { UserService } from '../repository/user.service' | |
import { json, useActionData, useLoaderData, useSubmit } from '@remix-run/react' | |
import type { UserInterface } from '../db/user' | |
import { Level, TestingStore } from '../db/user' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Red | |
Rails.logger.info "\e[31m[Error] Something went wrong\e[0m" | |
# Green | |
Rails.logger.info "\e[32m[Success] Operation completed\e[0m" | |
# Yellow | |
Rails.logger.info "\e[33m[Warning] Approaching limit\e[0m" | |
# Blue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/routes.rb | |
resources :documents do | |
scope module: 'documents' do | |
resources :versions do | |
post :restore, on: :member | |
end | |
resource :lock | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Documentation: https://shopify.dev/docs/apps/build/online-store/theme-app-extensions/configuration#detecting-app-blocks-and-app-embed-blocks | |
module ShopifyApiWrapper | |
class Theme | |
class << self | |
def app_embed_activated?(session:, theme_app_extension_id:) | |
new(session: session) | |
.app_embed_activated?(theme_app_extension_id: theme_app_extension_id) | |
end | |
end |
ngrok allows you to expose a web server running on your local machine to the internet.
We're hiring Backend Engineers who will be working on Ruby on Rails API apps. But sometimes also work on non-RoR app such as Sinatra or pure Ruby scripts. The developer will be working closely with me.
- Build RESTful APIs to support our front end team
- Take care of error handling and fixing real bugs on production
- Take ownership of the system health, monitoring and performance
API request
{"order": {"name": "Y977989-1", "tags": "braze_block", "email": "[email protected]", "currency": "AUD", "tax_lines": [{"rate": 0.1, "price": 2.27, "title": "GST"}], "total_tax": 2.27, "line_items": [{"id": 13851852701830, "sku": "21071501919", "name": "Rambler® 10 oz (296 ml) Tumbler - Power Pink", "grams": 300, "price": "25.00", "title": "Rambler® 10 oz (296 ml) Tumbler", "duties": [], "vendor": "YETI", "taxable": true, "quantity": 1, "gift_card": false, "price_set": {"shop_money": {"amount": "25.00", "currency_code": "AUD"}, "presentment_money": {"amount": "25.00", "currency_code": "AUD"}}, "product_id": 5137824678022, "properties": [], "variant_id": 40236113854598, "pre_tax_price": "22.73", "variant_title": "Power Pink", "product_exists": true, "total_discount": "0.00", "current_quantity": 1, "pre_tax_price_set": {"shop_money": {"amount": "22.73", "currency_code": "AUD"}, "presentment_money": {"amount": "22.73", "currency_code": "AUD"}},
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const regionNames = new Intl.DisplayNames( | |
['en'], {type: 'region'} | |
); | |
console.log(regionNames.of('US')); // 👉️ "United States" | |
console.log(regionNames.of('GB')); // 👉️ "United kingdom" | |
console.log(regionNames.of('DE')); // 👉️ "Germany" | |
console.log(regionNames.of('AU')); // 👉️ "Australia" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module AppProxyVerification | |
extend ActiveSupport::Concern | |
included do | |
skip_before_action :verify_authenticity_token, raise: false | |
before_action :verify_request | |
end | |
private |
NewerOlder