Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsrobot committed Dec 16, 2023
1 parent 068770e commit 9a4060a
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 36 deletions.
1 change: 0 additions & 1 deletion app/components/channel-feed.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export default function ChannelFeed(props) {

const [replyingTo, setReplyingTo] = useState(null);


useEffect(() => {
if (lastJsonMessage?.topic == channel.id) {
try {
Expand Down
3 changes: 2 additions & 1 deletion app/environment.server.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export default {
webUrl: process.env.WEB_URL ?? "http://localhost:3000",
hotUrl: process.env.HOT_URL ?? "http://localhost:3005/v1",
readHotUrl: process.env.READ_HOT_URL ?? "http://localhost:3005/v1",
writeHotUrl: process.env.WRITE_HOT_URL ?? "http://localhost:3005/v1",
wsUrl: process.env.WS_URL ?? "ws://localhost:3006/ws",
electron: !!process.env.ELECTRON ? process.env.ELECTRON === "true" : true,
wikidHeader: process.env.X_WICKED_HEADER ?? "8041c9f3768f7bb2e39eab09f9d6b9e12cc6a4d",
Expand Down
68 changes: 34 additions & 34 deletions app/wikid.server.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const joinBeta = async (request) => {
try {
const { data } = await axios({
method: 'post',
url: `${env.hotUrl}/auth/join_beta`,
url: `${env.writeHotUrl}/auth/join_beta`,
headers: standardHeaders,
timeout: 15_000,
data: request.input,
Expand Down Expand Up @@ -65,7 +65,7 @@ export const signUp = async (request) => {
try {
const { data, status: s } = await axios({
method: 'post',
url: `${env.hotUrl}/auth/sign_up`,
url: `${env.writeHotUrl}/auth/sign_up`,
headers: standardHeaders,
timeout: 15_000,
data: input,
Expand Down Expand Up @@ -102,7 +102,7 @@ export const signIn = async (request) => {
try {
const { data, status: s } = await axios({
method: 'post',
url: `${env.hotUrl}/auth/sign_in`,
url: `${env.writeHotUrl}/auth/sign_in`,
headers: standardHeaders,
timeout: 15_000,
data: input,
Expand Down Expand Up @@ -149,7 +149,7 @@ export const me = async (jwt) => {
try {
const { data, status: s } = await axios({
method: 'get',
url: `${env.hotUrl}/me`,
url: `${env.readHotUrl}/me`,
headers: headers,
timeout: 15_000,
});
Expand Down Expand Up @@ -199,7 +199,7 @@ export const updateProfile = async (name, handle, about, jwt) => {
try {
const { data, status: s } = await axios({
method: 'post',
url: `${env.hotUrl}/me/update`,
url: `${env.writeHotUrl}/me/update`,
headers: headers,
timeout: 15_000,
data: {
Expand Down Expand Up @@ -258,7 +258,7 @@ export const createCommunity = async (name, handle, _private, jwt) => {
try {
const { data, status: s } = await axios({
method: 'post',
url: `${env.hotUrl}/communities/create`,
url: `${env.writeHotUrl}/communities/create`,
headers: headers,
timeout: 15_000,
data: {
Expand Down Expand Up @@ -317,7 +317,7 @@ export const deleteCommunity = async (communityHandle, jwt) => {
try {
const { data, status: s } = await axios({
method: 'post',
url: `${env.hotUrl}/communities/${communityHandle}/delete`,
url: `${env.writeHotUrl}/communities/${communityHandle}/delete`,
headers: headers,
timeout: 15_000,
});
Expand Down Expand Up @@ -352,7 +352,7 @@ export const deleteCommunity = async (communityHandle, jwt) => {

export const selectChannel = async (communityHandle, channelHandle, jwt) => {
const request = {
url: `${env.hotUrl}/communities/${communityHandle}/channels/select`,
url: `${env.writeHotUrl}/communities/${communityHandle}/channels/select`,
method: 'post',
postData: {
channel_handle: channelHandle
Expand All @@ -364,7 +364,7 @@ export const selectChannel = async (communityHandle, channelHandle, jwt) => {

export const community = async (handle, jwt) => {
const request = {
url: `${env.hotUrl}/communities/${handle}`,
url: `${env.readHotUrl}/communities/${handle}`,
method: 'get',
postData: null,
jwt: jwt
Expand All @@ -374,7 +374,7 @@ export const community = async (handle, jwt) => {

export const communityRoles = async (handle, jwt) => {
const request = {
url: `${env.hotUrl}/communities/${handle}/roles`,
url: `${env.readHotUrl}/communities/${handle}/roles`,
method: 'get',
postData: null,
jwt: jwt
Expand All @@ -384,7 +384,7 @@ export const communityRoles = async (handle, jwt) => {

export const channel = async (communityHandle, channelHandle, page, jwt) => {
const request = {
url: `${env.hotUrl}/communities/${communityHandle}/channels/${channelHandle}?page=${page}`,
url: `${env.readHotUrl}/communities/${communityHandle}/channels/${channelHandle}?page=${page}`,
method: 'get',
postData: null,
jwt: jwt
Expand All @@ -394,7 +394,7 @@ export const channel = async (communityHandle, channelHandle, page, jwt) => {

export const createChannel = async (communityHandle, name, groupId, jwt) => {
const request = {
url: `${env.hotUrl}/communities/${communityHandle}/channels/create`,
url: `${env.writeHotUrl}/communities/${communityHandle}/channels/create`,
method: 'post',
postData: {
group_id: groupId,
Expand All @@ -407,7 +407,7 @@ export const createChannel = async (communityHandle, name, groupId, jwt) => {

export const editChannel = async (communityHandle, name, groupId, channelId, jwt) => {
const request = {
url: `${env.hotUrl}/communities/${communityHandle}/channels/edit`,
url: `${env.writeHotUrl}/communities/${communityHandle}/channels/edit`,
method: 'post',
postData: {
group_id: groupId,
Expand All @@ -421,7 +421,7 @@ export const editChannel = async (communityHandle, name, groupId, channelId, jwt

export const editGroup = async (communityHandle, groupId, name, jwt) => {
const request = {
url: `${env.hotUrl}/communities/${communityHandle}/groups/edit`,
url: `${env.writeHotUrl}/communities/${communityHandle}/groups/edit`,
method: 'post',
postData: {
group_id: groupId,
Expand All @@ -434,7 +434,7 @@ export const editGroup = async (communityHandle, groupId, name, jwt) => {

export const createGroup = async (communityHandle, name, jwt) => {
const request = {
url: `${env.hotUrl}/communities/${communityHandle}/groups/create`,
url: `${env.writeHotUrl}/communities/${communityHandle}/groups/create`,
method: 'post',
postData: {
name: name,
Expand All @@ -448,7 +448,7 @@ export const editProfilePicture = async (file, jwt) => {
const form = new FormData();
form.append('documents', file);
const request = {
url: `${env.hotUrl}/me/edit-profile-picture`,
url: `${env.writeHotUrl}/me/edit-profile-picture`,
form: form,
jwt: jwt
}
Expand All @@ -466,7 +466,7 @@ export const createMessage = async (communityHandle, channelId, text, parentId,
form.append('files', files);
}
const request = {
url: `${env.hotUrl}/communities/${communityHandle}/messages/create`,
url: `${env.writeHotUrl}/communities/${communityHandle}/messages/create`,
form: form,
jwt: jwt
}
Expand All @@ -475,7 +475,7 @@ export const createMessage = async (communityHandle, channelId, text, parentId,

export const editMessage = async (communityHandle, messageId, text, jwt) => {
const request = {
url: `${env.hotUrl}/communities/${communityHandle}/messages/edit`,
url: `${env.writeHotUrl}/communities/${communityHandle}/messages/edit`,
method: 'post',
postData: {
text: text,
Expand All @@ -488,7 +488,7 @@ export const editMessage = async (communityHandle, messageId, text, jwt) => {

export const reactMessage = async (communityHandle, messageId, reaction, jwt) => {
const request = {
url: `${env.hotUrl}/communities/${communityHandle}/messages/react`,
url: `${env.writeHotUrl}/communities/${communityHandle}/messages/react`,
method: 'post',
postData: {
reaction: reaction,
Expand All @@ -501,7 +501,7 @@ export const reactMessage = async (communityHandle, messageId, reaction, jwt) =>

export const communityUsers = async (communityHandle, jwt) => {
const request = {
url: `${env.hotUrl}/communities/${communityHandle}/users`,
url: `${env.readHotUrl}/communities/${communityHandle}/users`,
method: 'get',
postData: null,
jwt: jwt
Expand All @@ -511,7 +511,7 @@ export const communityUsers = async (communityHandle, jwt) => {

export const createRole = async (communityHandle, input, jwt) => {
const request = {
url: `${env.hotUrl}/communities/${communityHandle}/roles/create`,
url: `${env.writeHotUrl}/communities/${communityHandle}/roles/create`,
method: 'post',
postData: JSON.parse(input),
jwt: jwt
Expand All @@ -521,7 +521,7 @@ export const createRole = async (communityHandle, input, jwt) => {

export const editCommunity = async (communityHandle, input, jwt) => {
const request = {
url: `${env.hotUrl}/communities/${communityHandle}/edit`,
url: `${env.writeHotUrl}/communities/${communityHandle}/edit`,
method: 'post',
postData: JSON.parse(input),
jwt: jwt
Expand All @@ -531,7 +531,7 @@ export const editCommunity = async (communityHandle, input, jwt) => {

export const editDefaultPermissions = async (communityHandle, input, jwt) => {
const request = {
url: `${env.hotUrl}/communities/${communityHandle}/default-permissions/edit`,
url: `${env.writeHotUrl}/communities/${communityHandle}/default-permissions/edit`,
method: 'post',
postData: JSON.parse(input),
jwt: jwt
Expand All @@ -541,7 +541,7 @@ export const editDefaultPermissions = async (communityHandle, input, jwt) => {

export const editRole = async (communityHandle, input, jwt) => {
const request = {
url: `${env.hotUrl}/communities/${communityHandle}/roles/edit`,
url: `${env.writeHotUrl}/communities/${communityHandle}/roles/edit`,
method: 'post',
postData: JSON.parse(input),
jwt: jwt
Expand All @@ -551,7 +551,7 @@ export const editRole = async (communityHandle, input, jwt) => {

export const deleteRole = async (communityHandle, input, jwt) => {
const request = {
url: `${env.hotUrl}/communities/${communityHandle}/roles/delete`,
url: `${env.writeHotUrl}/communities/${communityHandle}/roles/delete`,
method: 'post',
postData: JSON.parse(input),
jwt: jwt
Expand All @@ -561,7 +561,7 @@ export const deleteRole = async (communityHandle, input, jwt) => {

export const deleteGroup = async (communityHandle, groupId, jwt) => {
const request = {
url: `${env.hotUrl}/communities/${communityHandle}/groups/delete`,
url: `${env.writeHotUrl}/communities/${communityHandle}/groups/delete`,
method: 'post',
postData: {
group_id: groupId,
Expand All @@ -573,7 +573,7 @@ export const deleteGroup = async (communityHandle, groupId, jwt) => {

export const deleteChannel = async (communityHandle, channelId, jwt) => {
const request = {
url: `${env.hotUrl}/communities/${communityHandle}/channels/delete`,
url: `${env.writeHotUrl}/communities/${communityHandle}/channels/delete`,
method: 'post',
postData: {
channel_id: channelId,
Expand All @@ -585,7 +585,7 @@ export const deleteChannel = async (communityHandle, channelId, jwt) => {

export const communityRole = async (communityHandle, roleId, jwt) => {
const request = {
url: `${env.hotUrl}/communities/${communityHandle}/roles/${roleId}`,
url: `${env.readHotUrl}/communities/${communityHandle}/roles/${roleId}`,
method: 'get',
postData: null,
jwt: jwt
Expand All @@ -595,7 +595,7 @@ export const communityRole = async (communityHandle, roleId, jwt) => {

export const defaultPermissions = async (communityHandle, jwt) => {
const request = {
url: `${env.hotUrl}/communities/${communityHandle}/default-permissions`,
url: `${env.readHotUrl}/communities/${communityHandle}/default-permissions`,
method: 'get',
postData: null,
jwt: jwt
Expand All @@ -605,7 +605,7 @@ export const defaultPermissions = async (communityHandle, jwt) => {

export const leaveCommunity = async (communityHandle, jwt) => {
const request = {
url: `${env.hotUrl}/communities/${communityHandle}/leave`,
url: `${env.writeHotUrl}/communities/${communityHandle}/leave`,
method: 'post',
postData: null,
jwt: jwt
Expand All @@ -615,7 +615,7 @@ export const leaveCommunity = async (communityHandle, jwt) => {

export const joinCommunity = async (code, jwt) => {
const request = {
url: `${env.hotUrl}/invite/accept`,
url: `${env.writeHotUrl}/invite/accept`,
method: 'post',
postData: {
code: code,
Expand All @@ -627,7 +627,7 @@ export const joinCommunity = async (code, jwt) => {

export const createInvite = async (communityHandle, expiresOnUse, jwt) => {
const request = {
url: `${env.hotUrl}/communities/${communityHandle}/invites/create`,
url: `${env.writeHotUrl}/communities/${communityHandle}/invites/create`,
method: 'post',
postData: {
expires_on_use: expiresOnUse,
Expand All @@ -639,7 +639,7 @@ export const createInvite = async (communityHandle, expiresOnUse, jwt) => {

export const editRolesPriority = async (communityHandle, roleIds, jwt) => {
const request = {
url: `${env.hotUrl}/communities/${communityHandle}/roles/edit-priority`,
url: `${env.writeHotUrl}/communities/${communityHandle}/roles/edit-priority`,
method: 'post',
postData: {
role_ids: roleIds,
Expand All @@ -651,7 +651,7 @@ export const editRolesPriority = async (communityHandle, roleIds, jwt) => {

export const checkInvite = async (code, jwt) => {
const request = {
url: `${env.hotUrl}/invite?code=${code}`,
url: `${env.readHotUrl}/invite?code=${code}`,
method: 'get',
postData: null,
jwt: jwt
Expand Down

0 comments on commit 9a4060a

Please sign in to comment.