Appearance improvements, update of endpoints, and implementation of .well-known for checking API URL #3

Merged
sauceyred merged 7 commits from dev into main 2025-05-30 23:21:01 +00:00
3 changed files with 6 additions and 10 deletions
Showing only changes of commit 9f3059f94c - Show all commits

View file

@ -20,7 +20,7 @@
<div id="channels-list">
<Channel v-for="channel of channels" :name="channel.name"
:uuid="channel.uuid" :current-uuid="(route.params.channelId as string)"
:href="`/servers/${route.params.serverId}/channels/${channel.uuid}`" />
:href="`/guilds/${route.params.serverId}/channels/${channel.uuid}`" />
</div>
</div>
<MessageArea :channel-url="channelUrlPath" />
@ -40,7 +40,7 @@ const route = useRoute();
const loading = useState("loading");
const channelUrlPath = `servers/${route.params.serverId}/channels/${route.params.channelId}`;
const channelUrlPath = `/channels/${route.params.channelId}`;
const server = ref<GuildResponse | undefined>();
const channels = ref<ChannelResponse[] | undefined>();
@ -104,13 +104,9 @@ onMounted(async () => {
console.log("channelid: set loading to true");
server.value = await fetchWithApi(`servers/${route.params.serverId}`);
channels.value = await fetchWithApi(
`servers/${route.params.serverId}/channels`
);
channels.value = await fetchWithApi(`/channels`);
console.log("channels:", channels.value);
channel.value = await fetchWithApi(
route.path
);
channel.value = await fetchWithApi(route.path);
console.log("channel:", channel.value);
console.log("channelid: channel:", channel);

View file

@ -5,7 +5,7 @@
</template>
<script lang="ts" setup>
const server = await fetchWithApi(`/servers/${useRoute().params.serverId}`);
const server = await fetchWithApi(`/guilds/${useRoute().params.serverId}`);
console.log("server:", server);
</script>

View file

@ -1,6 +1,6 @@
import type { UserResponse } from "~/types/interfaces"
export default async (serverId: string, memberId: string): Promise<UserResponse> => {
const user = await fetchWithApi(`/servers/${serverId}/members/${memberId}`) as UserResponse;
const user = await fetchWithApi(`/guilds/${serverId}/members/${memberId}`) as UserResponse;
return user;
}