Setting up Posts and Posts.Tweet

This commit is contained in:
2026-03-30 01:41:36 -04:00
parent 934879f95f
commit dcca583461
7 changed files with 570 additions and 1 deletions

22
lib/mixer/posts.ex Normal file
View File

@@ -0,0 +1,22 @@
defmodule Mixer.Posts do
use Ash.Domain,
otp_app: :mixer,
extensions: [AshTypescript.Rpc, AshAdmin.Domain]
admin do
show? true
end
resources do
resource Mixer.Posts.Tweet
end
typescript_rpc do
resource Mixer.Posts.Tweet do
rpc_action :create_tweet, :create
rpc_action :read_tweet, :read
rpc_action :update_tweet, :update
rpc_action :destroy_tweet, :destroy
end
end
end