- 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 { | |
AppType, | |
Provider as GadgetProvider, | |
useGadget, | |
} from "@gadgetinc/react-shopify-app-bridge"; | |
import { NavMenu } from "@shopify/app-bridge-react"; | |
import { Page, Spinner, Text } from "@shopify/polaris"; | |
import { useEffect, useMemo } from "react"; | |
import { | |
Outlet, |
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 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 | |
def initialize(session:) |
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
# Shop-specific webhooks need to be deleted before migration into App-specific webhooks | |
# Unless they will be triggered twice | |
require "mongo" | |
require "shopify_api" | |
def remove_webhook(shopify_domain, access_token) | |
# Get webhook | |
query = <<~GRAPHQL | |
query { |
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
```jsx | |
import { useMantle } from "@heymantle/react"; | |
import { useEffect } from 'react'; | |
export default function () { | |
const { createHostedSession } = useMantle(); | |
useEffect(() => { | |
(async () => { | |
const session = await createHostedSession({ type: 'plans' }); | |
open(session.url, "_self"); |
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
affiliate | |
trial | |
basic | |
professional | |
unlimited | |
shopify_plus | |
staff | |
staff_business | |
dormant | |
npo_full |
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 |
NewerOlder