diff --git a/views/index.ejs b/views/index.ejs
index 5ba82f2b82dbdc965d1d435af213df1788c8d6b0..4b565c37f5126485279c6efd5b5188c1aa00d879 100644
--- a/views/index.ejs
+++ b/views/index.ejs
@@ -11,7 +11,7 @@
   <header>
     <h1>Welcome to JourneyHub</h1>
     <nav>
-      <% if (session && session.id) { %>
+      <% if (session && session.userId) { %>
         <a href="/create" class="btn-create">Create Tour</a>
         <a href="/create-booking" class="btn-create">Create Booking</a>
       <% } %>
@@ -36,7 +36,7 @@
         <li>
           <a href="/tour/<%= tour.id %>"><%= tour.name %></a> - <%= tour.price %> THB
           
-          <% if (session && session.id) { %>  
+          <% if (session && session.userId) { %>  
             <a href="/edit/<%= tour.id %>" class="btn-edit">Edit</a> <!-- ปุ่มสำหรับแก้ไขทัวร์ -->
             <a href="/delete/<%= tour.id %>" class="btn-delete">Delete</a> <!-- ปุ่มสำหรับลบทัวร์ -->
           <% } %>