feat: change /servers endpoints to /guilds to reflect changes in PR #19
This commit is contained in:
parent
a92c74edc9
commit
9f3059f94c
3 changed files with 6 additions and 10 deletions
|
@ -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);
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue